Our city has a program called ACCESS RIDE. I'm not sure if it's local or federal... but a hospital case manager / discharge planner should be able to help you.
I have found that the hospital staff will ask you how you intend to go home and if you have anybody to care for you while you convalesce... Tell them your situation and they can arrange something suitable.
once you're out the door with a ride, you're no longer the hospital's responsibility. they have no say if it's a cab, a relative, a bus, whatever.
Hospitals won't allow taxis or public transportation? Ridiculous... of course they do.
Use a car service, like a taxicab, scheduled in advance. They will send a driver and a car that is acceptable to the hospital. I think you are very wise to do this. Good luck!