"We live in an apartment building."
Translation:Noi locuim într-un bloc.
I asked some native speaker friends of mine to explain me the difference. "A trăi", as you said, is used whenever you mean that you exist, that you are alive, when you mean the opposite of "being dead". "A locui" instead is used to mean that you reside in / inhabit a place (a building, a city)