Yes, you can apply for the program while in Canada as a temporary resident. You must maintain your legal status in the country while the application is being processed.