Sure, that's possible. When I moved to San Francisco I traded my car for a MUNI pass (and eventually a bicycle) which saved me a lot of money. A few months ago I tallied up how much my parents pay for housing + energy + transportation and how much I do, and the amounts are roughly the same, except I spend almost all of it on housing and they spend a lot on energy and transportation.
That said, most people who move to SF don't give up their cars.
SF isn't the only city where you can live car-free ;)
Also, cars are, sadly, much cheaper than houses. My spouse and I share a car and the TCO is not anywhere near our rent. At least an order of magnitude, maybe two.