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
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.