Well, I would tell her "no underwear...no dress". For sure. At home or at school, no dresses unless she's willing to wear underpants.
That said, some underwear is just down-right uncomfortable. I'm built like a stick and it seems like it's either riding up or slipping off. I actually wear boy's boxer briefs. I have yet to find women's underwear that are as comfy for me.
I would check into getting her different undies. At 5, even just around the house, she needs to wear them with dresses or skirts. Try to find out what bugs her. Is it the seams at the legs? The seams at the crotch? The waist band?
My little sister went through a phase of not wanting to wear underwear at night with her nightgowns and she often wanted to sleep with me, which was fine, but I wouldn't let her unless she had panties on. As a little kid, I just thought it was so gross not to have underwear on. Now as an adult, sleeping without underwear doesn't seem so weird, but as a child, no way would I go without panties.
Take her shopping. Try different styles and fits.
Best wishes.