Officially you can only do PAID work on a J-1 visa not on the regular student M-1.
There are some schemes for working on an M-1, like "training for your ATP" while building time as a Flight Instructor and you pay your employer like $1 an hour for the privilige.
Be aware the Immigration people are cracking down on this sort of messing in the margins.