You have to do wudoo’ using water from whatever is around you of the river or sea. The Prophet (blessings and peace of Allah be upon him) was asked about doing wudoo’ from the sea and he said: “Its water is a means of purification and its dead meat recovered from it is permissible .” So, praise be to Allah, if you took a dip in the sea to cool off or to remove dirt and the like, it is not sufficient; rather you have to do wudoo’.
But if you were in a state of janaabah, and you intended to remove both major and minor impurity by doing ghusl, it is sufficient. However, it is better to do wudoo’ as for prayer, then do ghusl to remove janaabah. This is what the Prophet (blessings and peace of Allah be upon him) used to do. The Prophet (blessings and peace of Allah be upon him) would start with wudoo’. He would clean himself first, then he would do wudoo’ as for prayer, then he would do ghusl. This is the Sunnah and that is sufficient.
But if he intended to do both together, and did not start with wudoo’, rather he intended to do ghusl and wudoo’ together with one intention, that is sufficient according to a number of scholars. What is better is to do what the Prophet (blessings and peace of Allah be upon him) did, namely clean oneself and do wudoo’ as for prayer first, then pour water over the body to complete one’s ghusl. This is the Sunnah when purifying oneself from janaabah. This also applies in the case of menses. When a woman’s menses ends, she should clean herself and do wudoo as for prayer, then she should wash herself, making sure that water reaches all parts of the body. This is what is enjoined in sharee‘ah, and this suffices for both wudoo’ and ghusl.
The water may come from the sea or a river or a well. Praise be to Allah, the matter is broad in scope. Allah, may He be exalted, said (interpretation of the meaning): “…and you find no water…” [al-Nisa’ 4:43]. Water includes seas, rivers, streams and wells. All of them come under the heading of water. End quote.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him)