I used to have three dogs - 12 lb, 20 lb and 55 lb. We lived in several small apt.s and the dogs never complained.
They each had a bed for alone time. They never had any desire to go off into a room I was not in. In my experience, one's dog lives in a 20 ft radius of oneself which is why they are so good to trip over. The yard issue is a whole other thing.
We did not always have access to a yard and I must say that a yard makes things much easier for the owner but can make the owner less likely to go for a proper walk. A big yard can accommodate some good games and they can get some exercise but it's fairly boring as the scent landscape is same old/same old. Wandering around the back yard is not the same thing as eagerly following your nose down the street checking peemail. Dogs like to travel and you can't travel in the back yard so, if you're able bodied, it doesn't really matter whether you live in a house or an apt.; either way you should go for a walk.
2c from a newby