THIS line is what's wrong with schools in our country.
The fact that a student would feel ashamed rather than proud of making stuff to talk to his teachers and ask about is absurd.
Some of the coolest memories I have from school are (damn I'm old) are monkeying with circuit boards and TRS-80s to speed them up, and talking to our physics teacher. He was one of the oddest people, but was so excited when we'd try and do something new. Even went out of his way to encourage us to make things even if they failed miserably. "You'll get it right next time" or "Well, now you know why people don't build it that way"
Both were the perfect reaction to students building/experimenting/testing stuff.
THIS is wrong by everyone.
Was the teacher ok to take something and put it in her desk that was being annoying in class? Yes. Just like if a student's cell phone rings these days, i'm ok with the teacher taking it for the time.
Not calling the police about it...