Generally, if you have to ask, the answer is no.
If you're secretly interested in her, just ask her out. If you're not, why do you want to buy her a bathing suit? Nothing says "I want to see you half naked" like buying someone underwear or a bathing suit.