We would like to spend a few days along the river on a hop on hop off type tour, seeing the castles we have a rental car
Do you mean the Rhine or the Rhone?
"...a hop on hop off type tour, seeing the castles we have a rental car..."
A car doesn't usually play much of a role, assuming your intention is to do this tour by CRUISE BOAT. Assuming you mean the Rhine in Germany, and assuming you want to park the car and do a cruise, there is a round-trip "castle cruise" offered by one company that will drop you back at your starting point:
https://www.bingen-ruedesheimer.de/en/castle-cruise
There are other cruises that take in the scenery from Bingen or Rüdesheim north to the St. Goar area - for most people these are one-way cruises of similar length - about 1.5 hours (and since you can't take your car, you take the train back to your starting point.) Two castles that are popular for taking a tour: Rheinfels Castle in St. Goar (at the north end of your cruise route) and Marksburg Castle in Braubach (north of St. Goarshausen - it's normally best to get off the boat in St. Goarshausen and take the train north from there to Braubach.)
A few people will choose to cruise back through the same scenery again, but the southbound return cruise takes nearly twice as long and of course repeats the experience. Hopping off the boat is usually inconvenient because the boat schedule is skimpy; it's best to do the one-way cruise northbound and then afterward do your hopping off, in whatever towns interest you, by train on your way back to your starting point (trains run every hour or better.)
You can instead drive if you wish to any of the towns and some of the castles - and visit or take a tour.
This map should orient you to the towns with train stops (grey circles) and the cruise stop options. Also shown are ferry crossings - there are no bridges between Koblenz and Mainz.
http://www.loreley-info.com/eng/rhein-rhine/walking-hiking.php