Things are a bit different for US citizens than for those nationals who are non-visa-exempt, so I wouldn't say you need to seek legal advice or spend extra money restoring status. That doesn't mean it's okay to overstay - but all a US citizen really needs to do to be back in "compliance" is go home for a bit, and then come back again for a visit. Just as with any other foreign national trying to enter Canada at a port-of-entry, there are no guarantees of being allowed to re-enter, but there are specific ways to deal with this situation when someone is the spouse of a Canadian and being sponsored for PR and if you have all your ducks in a row, it shouldn't be a huge issue.
First of all, applying inland is never really encouraged for US applicants, much less ones who don't have documented visitor status - whether they've overstayed or not. That's because a lot of times a US citizen coming into Canada won't even get documentation of their entry date and that can really mess up an inland application. And it's not necessary to return to your home country to apply outland
An applicant is ALWAYS able to apply through the embassy that represents their own country - regardless of where they may be staying or visiting during processing. For some applicants, it's a bit more complicated to apply outland when they're in Canada - if an interview is required, they have to attend at their own embassy and some countries don't allow passports to be transported over international borders - but for US applicants, it's relatively easy to apply outland for spousal PR while visiting in Canada. The temporary status is what's key to staying in Canada legally - and if you get documented status on entry, you can apply to extend from within Canada using proof of the relationship and the PR ap in process to support the extension. The hard part is getting the documented status in the first place - normally this requires that the Canadian sponsor enter Canada with a visa-exempt foreign national they're going to sponsor. Read through the info at
US2Canada. Follow the Visiting link to "Visitor Records" for more details.