What are your water parameters and how often do they do this? Mollies actually are able to "gulp" air from the surface of the water... mine do it all the time and they are healthy with plenty of aeration in their tank. If they just do it every once in a while, they should be fine. If they are at the top of the tank 24/7, however, I would worry that your water quality isn't that great.