No, you can get only males if you don't want them to breed. I wouldn't get only females unless you want fry, because females can be pregnant when you bring them home.
DONT get two males. when i got a second marble mollie (the first one died of being stuck to the filter and was a female) to go with my black mollie they were goin crazy on each other and i after like 2 weeks i had to bring back the male marble mollie that i had just gotten. i would recomend 2 females. there is a risk that they would be pregnant but it is better to maybe have some fry than get two males and have a big fight
Some fish stores keep their males and females seperate. Then you could get females without worying about fry. You might want to ask before you get them if the fish have been kept appart or if they were shipped together.