Your idea is sound, however water in natural freshwater systems are constantly being filtered by naturally occurring bacteria and plant life, so you might as well say when it reaches the ocean it may as well be RO water. If you stock your freshwater feed, especially a small one, it will be near impossible to match the filtering capability of a natural ecosystem and you will be dumping excess ammonia, nitrites and nitrates into your saltwater system. Then you have the added challenge of controlling disease in both systems. Like wrangy said above. That means you need two hospital tanks now and probably a UV between the two systems.
So lets say you give it a shot, you will need a planted system. Good lighting will be a must as well as a good substrate. You will need to evaluate the chemical makeup of that substrate to see if it will effect your reef. (Freshwater plants love phosphates and a lot of substrates contain these in big numbers) our reefs hate them.... next you have the PH differences most planted tanks tend to be around 7.0 or lower. I kept mine at 6.8, and finally to have the plants thrive, a lot of people dose carbon dioxide which freshwater plants need for proper photosynthesis to occur. For a heavily planted tank such as the one needed to really purify the water, I would guess this would be necessary. Not sure how this will effect the PH and buffering ability in a saltwater system.
Sounds like a real cool project, I would love to see a functioning system like this, it would be amazing, but I think it would need to be done on a very large system in order to make maintaining the water quality easier.