you can apply for immigration; if you do not require a visa, you can apply for temporary residence at a Canadian port of entry. There is no rule that prevents you from entering if your passport isn't valid for at least six months; however, timing is critical because your status will be limited to the term of your passport at the most extreme.
What constitutes a valid visa application?
A valid visa application is one that is submitted on the approved application form (if any) for the specified type of visa for a specific class of visa. All of the instructions on the document have been followed.
When submitting a visa application, you must include the following documents:
A travel journal
Recent ID photos
The supporting documents (originals and duplicates) are determined by your situation and your agreement.
To read more: https://www.pa-ic.com/expiring-passports-and-applying-for-immigration/expiring-passports-and-applying-for-immigration/