Sure, it's certainly possible. However it depends on a number of factors and also on an element of luck.
You'll want to make sure you take a 2 year program in Canada so that you qualify for a 3 year PGWP. Much lower chances of success with only a 1 program and PGWP. You'll also want to determine how many points you'll have once you finish your Canadian education and have at least 1 year of Canadian work experience. You'll want to be sitting over 470 points to make sure you can get PR. Anything below that, and PR won't be guaranteed.