No, you can not apply for a travel document from inside Canada. If you leave, you take your chances that you have to apply for a travel document from outside Canada and you may be refused and lose your PR. Even if you do get the travel document in the end, it could take a long time that you are stuck outside.
If you are visa exempt, you can travel to Canada without a travel document. Show your expired PR card when you enter and say you forgot to renew it. You might get away with that. If you are not visa exempt but have a US visa, you can go to the US, attempt to enter Canada in a rental car, private car or on foot and say the same.
Any time you enter Canada, immigration officers have the right to ask you how long you were gone etc. If they feel that you do not meet the residency requirements, they may report you and you could lose your PR.