I'm telling you what happened last week with me personally. I was the one talking with the immigration officers , I was the one told to cancel my "Non-B" by immigration officers and I was the one told where to apply for the Non-O by immigration officers.
I just had the same situation reversed and I didn't have to leave the country. I was on Non-B "Work Permit" and I changed it to Non O "Marriage". I did it at Changwattana immigration office