Probably shouldn't tell border patrol you're doing unpaid labor in a country you're visiting. When speaking to authorities it's best to say the absolute minimum required for the encounter.
replies(4):
[1] https://marksgray.com/immigration-blog/can-foreign-nationals...
[2] https://internationalcenter.umich.edu/students/employment-vo...
Generally yes.
But you can have on-campus jobs to supplement your income, and there are at least two programs (CPT and OPT) that let you get approval for limited-term employment in your area of study. CPT also requires university approval.
[1] https://www.uscis.gov/policy-manual/volume-12-part-l-chapter...