It is quite possible to buy a house in Canada without being a permanent resident. The only limitation you will encounter is financing from local banks, which is more difficult if you are not a permanent resident. You will either have to pay the full amount or ask for support from a bank in your home country. Banks sometimes have partnerships between their structure and a Canadian bank, which may help you.