One thing is true about kids--tell them they can't have something and it makes them want it even more. That said, I commend you for wanting your daughter to have a healthy diet. While I prepared healthy meals for my daughter when she was growing up, I still kept some sweets around. I just made sure to control how much she had and when she had it. Once they start school, it becomes more difficult to monitor what they eat. You can pack a snack--good idea--but sometimes kids trade with other kids. I had a friend whose son actually liked to eat raw vegetables and she would pack them in his lunch. One day he told her he didn't want to take them to school anymore because the other kids laughed at him. So it is tough when peer pressure gets involved.
My advice to you is to continue feeding her healthy foods at home. For sweets, you can make your own. I know it's time consuming but that way you can control what ingredients are in those items. Or buy things that are more natural. The best you can do is educate her on proper eating while explaining the reason for buying/preparing the foods you serve. Hopefully, when she's away from you (school, friend's house) she will put into practice what she's been taught. Just realize when she's away from home it is inevitable that she'll sometimes eat and drink sugary items. I say--as long as there aren't any food allergies involved--everything in moderation.