I actually RTFA, and I actually RTF policy too. No where does it state that the possession of minimally nutritious foods is punishable. If anyone (besides the teacher assigning the detention) deserves punishment, and that's a very big if, it's the student that handed out the candy, not the one who accepted it. "FMNV may not be sold or given away to students on school premises by school administrators or staff (principals, coaches, teachers, etc.), [b]students[/b] or student groups, parents or parent groups, guest speakers, or any other person, company or organization." (emphasis mine)
Of course, the detrimental affects of prohibiting sharing and other critical social activities far out-weigh any health hazards posed by that lone Jolly Rancher. Stupid stupid school