Laws of thermodynamics aren't really useful here. They are perfect for explaining universe, and notoriously bad for predicting local events when you zoom and focus at a fine grain level and add time. Life beings are apparently breaking or "delaying" this laws all the f*ng time.
In any case nobody is trying to make a perpetual movement machine.
The goal is to create a cheaper way to extract salt from saltwater, and use the pressure gradient at the sea to put apart brine and water could be a solution waiting for an engineer (in my opinion). It is assumed that will not be free in terms of energy. It doesn't matter as long as is slightly better than the current solution. Would be much faster than waiting for the sun so it does not need to be cheaper than that. It just needs to be able to replace the last energy-expensive phase of our current solution by another process that is cheaper or faster.
Second law of thermodynamics.