You could make a feature like flood plains that inhabits all possible riverside tiles (rather than just desert). Then you could make a unit that can only travel on that feature. As a matter of fact I could probably do it...
OK, its a little more complicated than that. First of all, a feature like that would kill all riverside forest, so you would have to add not just one feature but three (riverside, riverside forest, and riverside jungle). Next, as was recently discussed in another thread, FeaturePassableTech doesnt make a feature passable, it just turns off unpassability if it was artificially imposed. Maybe it could still be done this way by making riverside impassable, then giving all civs a hidden free tech ShoreWalking that allows land units to pass riverside. But still theres no way to allow a unit of either domain to traverse land terrains only on the condition they have a specific feature or set of features. So maybe te ActsAsCity tag in improvements is an answer. Wherever you have riverside terrains, instead of regular improvements you can make RiversideFarm, RiversideTown, etc...and all these have the ability to act as city, which I believe is what makes Forts able to act as canals. However, this is limited to one tile or so. Maybe that could be changed with sdk or something.