I've been using agents for 15 years. It's my own experience. A reputable agent will tell you to cancel first before leaving Thailand. Most people who answered so far have never used an agent in their life / have no idea what they are talking about. They throw buzz words and quote the law. Using an agent to by-pass is not doing it the lawful way, so their BS doesn't apply to you. You are using a bribe to get the Non O and extension.
You mostly received bad info so far (except from Wylie below). You have to cancel your visa with your current agent, bounce, and come back to start over on marriage visa. Boucing alone is not enough, the visa need to be canceled (voided) before bouncing. Since you used an agent to by-pass financial requirement, this is the procedure to not get into any trouble while applying for Non O based on marriage. You have to cancel the visa before leaving no matter what. You will get a 2 weeks grace period when the visa get canceled where overstay doesn't count (a 2 weeks stamp).
You can't start over without leaving the country. You have to cancel the visa with your agent and then bounce and come back to start over without the use of an agent.
You said that you don't have to cancel the retirement extension, so you knew what I was referring to. In which you are factually incorrect. If you don't cancel the 12 months extension or wtv it's call, leave the country and come back, you will not be able to do it on your own without using an agent again.
Yes, you can cancel :). I did it a few times. The first was when there was a crackdown on volunteer visa, had to cancel before leaving the country. Did it another time since because I had the $ for Non O extension. If you don't cancel you won't be able to DIY.