That is correct. A round trip (or closed loop) US to US cruise only needs to visit a foreign port. For a one way trip (open loop) US to US cruise, the foreign port must be a distant one...
And yes, that is for foreign flagged passenger vessels. If the ship is US flagged, I believe just about any itinerary is allowable. However, there aren't many US plagged cruise ships. Other than NCL doing the Hawaii closed loop cruises without a foreign port, I can't think of any...
Niot sure about the US river cruises and inland waterway cruises...