It’s very difficult, nearly impossible even, to find evidence of these sorts of arrangements in apartments, but it’s a little easier to figure out with houses. It seems to have been not uncommon for house owners to rent out a room or rooms on the upper floor as living spaces, most likely to freedpersons and clients. Being on the upper floor more easily separated the rented space from family space. If the rooms were at the very front of the house, an external staircase could even be added to allow easy access from the street. People living in rooms further back in the house, on the other hand, would have to go into the house and through the atrium.
Staircases in Pompeii mostly didn’t survive, though a few did in Herculaneum. In Pompeii many upper floors didn’t survive either, making it harder for archaeologists to determine which rooms might have been rented out. The easiest way to find such spaces, especially at Herculaneum, is to look for a separate hearth. Rooms that are structurally part of the house but only open onto the street and not the house might be separate living spaces, but if they’re on the ground floor they might also just be a shop. Or both. Another possible, though less definitive indicator are the secondary reception rooms Wallace-Hadrill finds in his study of Pompeiian houses.
As Wallace-Hadrill argues, houses were not necessarily just “family” homes. They could, and sometimes did, hold multiple, unrelated households in secondary spaces.
Wallace-Hadrill, Andrew. "Houses and Households: Sampling Pompeii and Herculaneum." In Marriage, Divorce, and Children in Ancient Rome, edited by Beryl Rawson, 191-227. Oxford: Oxford University Press, 1991.