ED or volunteer visa is fine but you don't "buy one" from an agent (a likely scam) versus sign up with a school or NGO/volunteer organization to get one. Plenty of schools around covering things like learning Thai or self-defense you can sign up to.
if they're signing you up for say an ED on Non-Imm O (volunteer) visa (which most of them do) and you're not attending classes or actually volunteering, that's illegal
under Thai law, if you were writing an email for work on a one-week holiday you'd be breaching Thai law. It's a question of what they care about enforcing. And all this talk about digital nomad visas they're on again about at the moment mean nothing without the legal right to work.
I've lived here nearly nine years and I work exclusively online - the first few years I went through longer tourists visas then a few years of ED visas, all of which meant I was illegal working. The last four years I've used an umbrella company, have a work permit and pay Thai taxes. For longer you're here, the more risk there is in not doing the right thing - and that's even in between the occasional visa crackdowns. 3-6 months they're not going care.
100% required. If you're working in Thailand you require an appropriate visa and work permit. That some do and don't get caught is because authorities prioritize who they care about - still illegal but they mostly only really care if you're taking jobs from locals.
This interview with the CM Work Permit Office is a good summary of the general attitude.