@Marty *******
IF you are indeed on a yearly extension of stay from your immigration office (from that O-A visa entry before) there is no problem changing the reason for the extension from retirement to marriage when your next extension is due.
The requirement is you need to get at least ONE extension for the reason the visa was issued <- which in your case seeing as it was an O-A it was issued based on you being over 50 (retirement). SO you would have needed one yearly extension for that reason from the immigration office before you could change the reason for the extension the next time that you applied for an extension.
As long as you met the requirement and brought in a minimum of 40K baht a month each month, every month for the previous 12 months before you apply for the new extension based on marriage you should be able to change the reason from retirement to marriage and there is no reason you would have to leave the country.
What immigration office do you deal with?