As a US citizen, once you're admitted to Canada you're authorized to remain for up to six months. That's the rule you're talking about. Technically you're in Canada illegally, but it's not like someone from Immigration Canada is going to come looking for you - for all they know, you left a long time ago. I don't know that you have to prove you have not overstayed your temporary status in order to get a marriage licence in Canada because I didn't get married in Canada, and it may have to do with what province you're in also, so someone else will have to speak to that - but what you need, ultimately, in order to stay and settle in Canada is permanent resident status. You're eligible for permanent residence status through sponsorship if you are married to a Canadian citizen/permanent resident, or if you are in an established common-law partnership (by being able to prove you've co-habitated for at least one continuous year).
My advice would be to take care of the marriage piece first - if you intend to marry anyway, it's the easier "proof" of eligibility to be sponsored because it doesn't involve having to submit documentation (like lease agreements, etc) to prove your one year of co-habitation. If you can get married in Canada, then do that so you're eligible to apply for PR. Assuming that you want to remain in Canada with your spouse while waiting for your PR application to be processed, you STILL definitely want to apply via the
outland application process. You don't have to apply using the "in Canada" application just because you want to stay in Canada during processing - even though the info on the CIC website would seem to indicate that you do. In fact, if you did apply inland, because you don't have valid temporary status your application will require special handling and it could take a couple of years to be finalized! The outland process does not have a residency requirement, so you're okay to be visiting in Canada (or anywhere else) and still have your application processed at the embassy that represents your country (Buffalo). Through Buffalo you could expect to be finalized in approximately 5-10 months.
Once you're married and you have your PR ap in process, you and your spouse can take a trip into the States, and then re-enter Canada with your spouse accompanying you to speak on your behalf about getting documented temporary status to stay while waiting for your PR ap to finalize. There's more information on this at the
US2Canada website - under the Visiting tab. The document you'd be documented on is a Visitor Record, so follow the links for information about how that all works. You won't want to mention that you've already been in Canada and overstayed - as soon as you leave Canada, you're back in compliance and what happened before is irrelevant to your new entry. If you're concerned about them knowing you were in Canada because of having a marriage licence that shows marriage in Canada, you also have the option to legally marry States-side - maybe take a honeymoon there - and then re-enter Canada after. We can talk more about the particulars of that if you want to - just PM me.
The one concern I have is your mention about taking classes in Canada. If you are doing anything other than taking a course that has a duration of less than six months time, you could be in violation of the Act by attending school without authorization. So we definitely need to talk about that.
In the meantime, hope this gets you started in the right direction - I'm happy to help with any additional questions.
Welcome to RTC
RL