no, you can set up a company while you’re in thailand, like I said I’m in the process now. You don’t need to leave the country to go from tourist to non b visa.
if you qualify for a WP you can switch from tourist to Non B visa, this all depends if you qualify for one though but it is possible. I’m applying for one through my company and doing it now so it’s possible.