Technically, you do need a work permit for volunteer or charity work.
However, it is down to the individual in charge.
I was at a meeting that was trying to sort out beach patrol and life saving here on the island.
I asked the mayor if I would need a work permit in order to help.
His response was that no one will ever have a problem doing volunteer work that helps the community or saves lives. No work permit needed.
I have said this many times - there is the letter of Thai law and there is the spirit of Thai law.
Spirit wins every time.