IF you want to enter Thailand on tourist visa or visa-exempt then apply for Non-O visa/extension, you need to apply for in-country Non-O first (general info is on the link below), then apply for an extension (general info is mentioned above)
[this is info for Non-O being married to a Thai]
************************************************************************************************************************************************
*******
/6.FOR-PROVIDING-SUPPORT-TO-OR-BEING-A-DEPENDANT-OF-A-THAI-CITIZEN-SPOUSE-VISA-NON-O.pdf