There's an easy way to rescue fleets that have become stuck on land, whether river mouths or any other coastline...
- First unload any agents or troops you have onboard the ships
- Create a rally point at your nearest port, then drag it over immediately adjacent to a sea square next to your stuck fleet
- Drag your fleet to the rally point and it's now free!
- To tidy up, reset the rally point to the port and if desired, reload your agents and troops
Optionally, there's one of the cheats that enables you to move a unit to any coordinate, so you could use that instead.
I think it's also possible to free your ships if an enemy fleet is adjacent to them, with you attacking the enemy and your fleet then automoves into its position if you win. I'm 99% certain that's what happened in a game last night, but it was only after I clicked to attack that I realized my fleet looked like it was otherwise stuck on the coast.
Bookmarks