Do I get to tell a student I could see her underwear?
Um, that really is kind of creepy. Are you serious about that? Why are you going to tell her you saw her underwear?
I'm bored and I think it's a funny joke
You shouldn't joke about that, it's rude to joke about seeing someone exposed. She'll feel embarrassed if you tell her that.
I'm fine with it if it offends her.
Jokes are supposed to be funny to all and not just you. Tell another joke that everyone 'gets' and you'll be seen as much more hilarious and wittier.