I don't know of a case of someone being barred from being a passenger in a car, and doubt very much that this would stand up to legal scrutiny. The state does have a public safety interest in mandating who can operate fairly heavy machinery in public though.
https://en.wikipedia.org/wiki/Shanghai_Ferry
The ferries are especially useful if you want to take a bicycle across the river.
It is actually prohibited even in emergencies. Pedestrians absolutely have no right of way in an interstate. You must ask for rescue if you get stuck as a result of collision or a car failure.
In California, for example, bicycling or waling on freeway shoulders is permitted except where specifically prohibited and signed. Bicyclists and pedestrians are prohibted from most California Interstate highways where there are alterantives bicycle and pedestrian routes, but there are mnay California Interstates on which bicyclists and pedesrians are allowed, including sections of I-5, I-10, and I-80.
In California, state law expressly allows walking along a freeway in an emergency:
https://leginfo.legislature.ca.gov/faces/codes_displaySectio....