The process would be like this:
1. Take in salt water
2. Spend some energy to separate salt from water.
3. Put fresh water into a container.
4. The container containing fresh water will raise to the surface, since it is less dense than salt water.
There is no perpetual motion.