All commonly traded mollies can be kept in brackish water. They can all be kept in saltwater aquaria, too.
Keeping them in freshwater is really a personal preference. On balance, I feel that your odds of success are greatest when kept in brackish water (around SG 1;003-1.005 is ideal). But some people keep them successfully in freshwater.
If you are going to keep them in freshwater, three things are essential: zero nitrate (and of course other nitrogenous wastes); high levels of carbonate hardness (at least 10 degrees KH); and a pH around 8.0. If you can't guarantee those conditions, keep them in a brackish water tank, where marine salt mix will [a] moderate the toxicity of nitrate and raise the pH/carbonate hardness.
Note: ONLY marine salt mix will do this; common salt (i.e., aquarium salt, tonic salt, cooking salt) will not. It has to be marine mix (e.g., Reef Crystals, Instant Ocean, etc.).
If you live in a soft water area, don't even bother to keep mollies without marine salt mix; they won't last long in soft/acid water.
Cheers, Neale