@euindkan
You are right, curiously though the immigration officials use the specific term "gainful employment" which excludes volunteer work, for example with appropriate waivers aliens can join the CAP.
In this particular case (in the discussion)the person will not be violating any federal immigration laws. Only thing he needs is proper insurance to make sure that the flight school or aircraft leaser is happy.