Why would you want to just buy a pair of panties exactly? You know the cashier will not laugh at you. Even if they wanted to they cannot becasue then they could get into trouble from staff pr a superior member of staff. If you really want some then just go and buy them. You won't get them any other way unless you get another friend to get them with your money for you.
No one will care. if anyone did say anything ( and they won't) just say its a present for your sister. UK
Cashier won't care what you're buying. You could always buy a few other items as well, some socks, a scarf or something like that. Don't tell them you're buying it for someone else, nobody ever believes that line. Just act casual and try not to be nervous. It's not like you're doing anything wrong anyway! You're JUST BUYING clothes!! =)
Of course it is legal. If you don't want anybody to know the best option is to buy it at a store. Pretend you're buying it for someone else by asking if they can wrap it up as a gift.