I'm pretty sure they just edited the images, not the actual game. But I have good news and bad news related to what you're asking:
The good news is that allowing clothes to be changed in the dungeon is extremely easy: just remove State #17 "SYS[SECURE Clothes]" from the main character, and then you can change her clothes no matter where she is -- I use a customized version of the cheat plugin for that sort of thing.
The bad news is that if you do this and change your clothes in a dungeon, then the game will crash as soon as battle starts. Which is actually pretty interesting now that I think about it, since if you instead teleport into a dungeon with a normal outfit then she'll transform at the start of battle. Maybe the game is just confused by the combination of normal outfit with magical hair, I dunno.
Edit: I commented out the line that was making it crash and
now it's complaining about not finding the image for clothes in that pose. So I think that what you're asking for isn't possible unless someone specifically makes new clothing images for that pose (and also figures out why exactly it's crashing trying to draw... a battle gauge(?) for other outfits).
The gym teacher? IIRC you just need to go to class in the gym, and then do what he tells you.
Locations for all materials are listed in the Materials and/or Enemy Drops pages of my spreadsheet:
You must be registered to see the links