I'm genuinely curious about whether this is okay or not. I'm not dwelling, just interested as me and DP have different views!
I sent my DC to preschool with one little sweet from their Halloween bucket because they requested. The rest of their lunchbox is always well-rounded and this was just a small treat for DC (especially considering the buckets are going down so slow!) 
There is nothing in the rules of the nursery that says they can't bring sweets (or any rules whatsoever about what can/can't be brought) in their lunchbox.
However, when DC was collected, it was explained by a staff member that she'd been told she wasn't allowed it and it was hidden and then put back in at the end to take home. The reason given is that it was unfair for the other children to see DC with it as they'd all want one and it wouldn't be fair if they didn't have them?
Just curious to see thoughts on this!