Yep, you can find instructions for applying for a Canadian passport abroad here: https://www.canada.ca/en/immigratio...ssports-abroad/new-adult-passport-abroad.html - from what I understand it's 20 business days + mailing time (when you apply from abroad, they print the passports in Canada and mail them). So a bit more certain than, for example, applying for a PRTD.It's actually not necessary to get the passport while in Canada (there is no passport control when departing Canada) - although it might be a lot easier than abroad, depending on circumstances.
The important thing to keep in mind is that a Canadian citizen will need a Canadian passport to board flights to Canada in the future.
The main thing is that you may want to sort out the guarantor and two references out before you leave, so you have all of that ready when you apply from abroad.
If for some reason, applying from abroad for a Canadian passport doesn't work out with your situation, but you are able to fly into the US, then you can also try to re-enter Canada from the land border. (In theory it might also work with Saint Pierre and Miquelon but I haven't seen any reports of anyone having ever attempted this.)
