My dealer recommends keeping mollies in water with a little salt. Especially those with sail fins. They would even thrive in marine habitats. In large fish farms, they are usually kept and bred using salt and often antibiotics, just like guppies. It is really difficult to adapt them to normal aquarium conditions.
I have gone fishing and caught various molly species, and this is the area where a little of the biodiversity research I natter on about is very valuable.
Within US Poeilia latipinna, there are local populations adapted to pure freshwater, and others adapted to brackish. It's not certain if the saltier water ones can adapt to the same habitats freshwater fish of the same species thrive in. We see great variation in needs between the wild molly species in southern North America into northern South America and the Carribbean, as different habitats create different needs. You can't say "molly" and be sure you are talking about the same fish as your friend is.
Here's the molly group. not counting the many hybrids the hobby has made.
Does it look like all these species could have the same needs and same adaptations?
Mollienesia Lesueur 1821
Poecilia (Mollienesia) boesemani
Poecilia (Mollienesia) butleri
Poecilia (Mollienesia) catemaconis
Poecilia (Mollienesia) chica
Poecilia (Mollienesia) formosa
Poecilia (Mollienesia) gillii
Poecilia (Mollienesia) hondurensis
Poecilia (Mollienesia) koperi
Poecilia (Mollienesia) kykesis
Poecilia (Mollienesia) latipinna
Poecilia (Mollienesia) latipunctata
Poecilia (Mollienesia) limantouri
Poecilia (Mollienesia) marcellinoi
Poecilia (Mollienesia) maylandi
Poecilia (Mollienesia) mechthildae
Poecilia (Mollienesia) mexicana
Poecilia (Mollienesia) nelsoni
Poecilia (Mollienesia) orri
Poecilia (Mollienesia) petenensis
Poecilia (Mollienesia) rositae
Poecilia (Mollienesia) salvatoris
Poecilia (Mollienesia) sphenops
Poecilia (Mollienesia) sulphuraria
Poecilia (Mollienesia) teresae
Poecilia (Mollienesia) thermalis
Poecilia (Mollienesia) vandepolli
Poecilia (Mollienesia) velifera
Poecilia (Mollienesia) wandae
You'd be surprised how many fish have gone into the soup for making the hobby ones - latipinna, and velifera from the saltier side, mexicana, lots of sphenops, butleri from the hard freshwater world. Even if we just look at the ones in the trade, saying 'mollies like salt' is like saying "bird eat seeds".
I've kept 11 of those species, and forget 'varieties' or 'types' - they can be pretty distinctive in how you keep them. It's actually not an easy fish to keep. Like goldfish, they are productive and cheap, and the hobby runs its hybrids as disposable fish. Not many hobbyists manage to keep them for their full lifespans, or grow out their babies to good sizes.