What are the laws and penaltys for someone of the opposite sex to enter a restroom or locker room in a public accomodation? and also in a public school?
If you do not expose yourself, and the state has no specific laws against it, then there may be no legal penalty ... but, you might be asked to leave the building or punished at school. There are reasons why bathrooms tend to be identified by gender or able to be locked.