Mollies will live in 20c water without any harm and so will goldfish so they can be kept together in one aquarium but are not really compatable.
To keep them happy they are a lot better separate. As Boo said, mollies prefer slightly brackish water at 25c and are more likely to breed when there are plenty of plants.
Goldfish do best in 20c neutral water but will eat tropical plants, baby mollies and if big enough even adult mollies.
Livebearing tropical fish used to be considered the novice and cheap option as the egglayers were more difficult to breed. Nowadays there are so many varieties of guppies, mollies, platies and swordtails that you can have a fantastic display aquarium with reasonably longlived fish and if plenty of plant are present there may even be the occasional baby that survives.