Oh man, I used to bring my tamagotchi (original black with gray trim) to school in 4th-6th grade! That was back in '97-99, so it was a little less awkward for a guy to do so, though my friends and I were clearly in the minority gender-wise. When the Digimon virtual pet came out most of us added at least one to our collections (I had two, but one was stolen right after I had raised my first Teddymon! /anger). Our teachers let us have them, but only so long as they were not distracting us (which mostly meant only have them out between subjects, at recess or lunch time). We hung out at the far end of the playground, talking about our various pets, cleaning virtual poo, and fighting it out once the Digimon came along.
The only embarrassing moment I had wasn't even with my tamagotchi. A buddy has just picked up another virtual pet (neopet? Or maybe a nanopet?) and wanted to show me, but couldn't wait until recess. He passed it to me across the aisle when our teacher wasn't looking, but he had forgotten the First Commandment of Virtual Pets at School: Thou Shalt Not Leave The Sound On! And guess who payed for that mistake... I never even got a chance to see the pet on the screen. The unfortunate creature beeped for attention... And boy did it get it! The teacher turned around, saw our guilty looks, took one look at my balled up fist (with the key chain suspiciously dangling from between my fingers) and called me to the front of the class. Everyone laughed, the pet was confiscated, and my parents would have to come retrieve it!
My dad laughed when I told him about our predicament. The next time my buddy came over to our house, Dad told him his parents just had to ask my dad to go pick it up and he would. My buddy didn't want to get in trouble with his parents, do he decided to settle for his 9+ tamagotchis (that was a massive collection in those days).
Oh, right, my advice will seem redundant to those who have followed this thread, but it boils down to discretion! It doesn't matter where you hide your pet, so long as the right people don't see it. I rediscovered my pets last Fall when I was last home at my parent's house. Since then I've been known to carry both my tamagotchi and my digimon with me (and the app on my phone). I set all to silent and only check on them when I know it's safe. I don't have to worry about a teacher catching me, but my boss, colleagues, or even the students in the classes I teach (all my students are older than myself. If not for that, I might be comfortable in showing them, maybe)... I would be happy to share my vpets with them, but in most cases I doubt they'd be interested. Plus, we all know there's a special joy that comes from hiding a little secret like this
So yes, use discretion and only let those you're comfortable with and trust know you've got your tamagotchi, otherwise you're just painting a target on yourself.