You can apply for immigration during your studies and then (if you got your PR) wait for three years to apply for citizenship you can do that. I know people who have done their masters in Quebec and continue for their Phd and they were able to get their citizenship before finishing studies...