You cannot be on a retirement visa and then work legally in Thailand. I know someone who got busted for that and he wasn't even "working", just on suspicion of doing so was enough to usher in a bunch of immigration police officers to raid the place he was at and to secure the passports of everyone there to check for overstays, illegal work, etc. He had to pay a large fine at the very least.