Two flats are sometimes located in neighborhoods that are zoned for taller buildings and allow for an additional residential unit to be constructed above. Any construction done would need to meet city code. I would contact an architect to determine if a prefab structure is allowed and if not, what the alternatives might be.
A cost benefit analysis would need to be done. There may well be a building available that meets your needs without having to build above. Unless you're experienced at doing this I would stay away from such an undertaking.
Your idea is being done in a number of urban/metropolitan areas. There are modern prefab modules that can be basically craned/lifted onto your roof top for a penthouse. You might search http://www.fabprefab.com for some examples.
firstname.lastname@example.org or 713 992 6539
Sorry, but this sounds like a really odd plan. I just can't imagine this being done. How about just using the top floor and converting it to a penthouse, or buying a building with a penthouse.
For example, Marina Towers originally had studio, one bedroom and two bedroom apartments/condos (possibly some 3 bedrooms). The larger units were on higher floors. A couple of people bought two neighboring two bedroom units and combined them into beautiful suites.
Again, I'm sorry, but this doesn't make sense to me. Wouldn't you want to buy an apartment building as investment property? You are putting your personal home criteria above a sound investment. Why wouldn't you look for a penthouse for yourself and a different apartment building for income property?
I'm sure there is more to the story.