If the water is hard and alkaline and there is ammonia in the water, the fish will be very unhappy and producing excess mucous (creamy to white patching) to try and reduce the damage the ammonia is doing to its skin. Alternatively the fish has a protozoan infection and is producing excess mucous (cloudy white patches) to try to heal the infection.
Scratching/ rubbing on objects can be caused by a parasitic infection (protozoans) or skin irritation, (ammonia in alkaline water).
The quickest way to dilute ammonia, nitrite or nitrate levels in the tank is to do 50-90% water changes, and gravel clean the tank at the same time. Just make sure any new water going into the tank is free of chlorine/ chloramine before it is added to the aquarium. Make the water up in a clean fish only bucket, add dechlorinator and aerate well for at least a couple of minutes (preferably 24hours or longer) before you add the water to the tank.
What other fish are in the tank?
You can add 1 heaped tablespoon or rock or swimming pool salt for every 20litres of aquarium water. Mollies love salt and this level will not affect the fish but will kill many parasites in the water.
to work out the volume of water,
measure length x width x height in cm,
divide by 1000,
= volume in litres.
When you measure the height, measure from the top of the gravel/ substrate, to the top of the water level.