I agree, what's allowed will vary from one location to another. Not just differences in countries, states, or provinces, but also within the town, city, or village. The tax office or the building dept. will have maps & info on your area & can tell you specifically what's allowed on your property.
Even if it isn't allowed, applying for a variance to the zoning law, in most cases, will get you permission. There are houses & garages in my town that have apartments that are above or in the garages, & the town granted permission. It's a slower process compared to just getting a permit to build, so plan ahead.
Something else to think about if they allow you to do what you have planned. Be careful where you plan to locate the structures on your property. Where I live, a detached garage cannot be closer to the front property line than the house, & there are minimum distances to the rest of the property lines called set back limits.
You don't want to build the garage in one spot & screw you up later with eliminating the ideal location of where you want to place the house, septic, well, or any other feature on the land. Of course if you have a lot of acreage it may not be an issue, but if you have a narrow or shallow lot, you'll regret it.