Yes, you can rent out your home and get landlord insurance while keeping your original home mortgage unchanged, as long as you have met your mortgage lender's 12-month residency requirement.
It's fairly common for mom-and-pop real estate investors to buy a new home with a residential mortgage, live in it for at least one year, then move out. They use the rental income from the property to pay their original mortgage and move on to a new house.
However, it's extremely important to cancel your home insurance policy and switch to a landlord insurance policy as soon as you have tenants (see Flat Cancellation). If you suffer property damage like a kitchen fire and file a claim, your insurance company will research your property to figure out how the fire started.
If they realize that the property was not your primary residence at the time of the property damage, your homeowner's insurance claim will be denied.
From your mortgage lender's perspective, they don't care which type of insurance coverage you have (landlord vs homeowners) as long as they're certain that their investment is safe.