I believe the official term is accessory dwelling unit. You'll have to check your local zoning regulations on the rules and regulations for those. Yes there are companies that specialize in building those.
ADUs generally have plumbing/electrical and are permanent living spaces. You could get away with an accessory building (permit required) or depending on your zoning, a smaller structure/shed (no permit required).