Truly a sad state of our society when an honest mistake by a student would trap him in a Catch 22.
Would he have been any better off as suggested above to approach the principal? I doubt it, based on their response.
He could have just kept quiet and left at the end of the day. Even if something ran afoul, would he be in any worse a position as he is in now?
He took the course he thought best, to get the offending object off campus ASAP. His mistake was being overheard by a staff member. Now what is he going to learn from this...certainly to never trust any of these authority figures. I suspect all the students will drop any trust they have, if it wasn't already lost.
All I see is a lose-lose situation here.