There are multiple laws and policies in play. Your institution should be liable for certifying your effort on any federal project, as required by Uniform Guidance. Your effort should be defined at your institution; most likely as all pay received at that institution regardless of the department or school. I believe student positions are supposed to be 20hrs/week per the Dept of Labor. The Dept of Labor and IRS also have restrictions over the classifications of independent contractors, which may flow down to specific state regulations. In order to receive pay as an IC from an institution, you may have to pass a 3-part test.
Further, you are not allowed to have effort on a grant and also be paid as a consultant on the same project. You are also not allowed to be an employee and a consultant at the same institution. Some positions prohibit the amount of time you can devote to outside consulting work; this is most likely true for faculty positions. Your institution should be able to tell you if this true for students.
As long as you are complying with federal and state labor laws as well as any effort reporting or outside appointment guidance of your institution, you should be fine. This type of regulation would not be specifically addressed by NSF as much as by these other federal and state agencies that regulate labor, employment, and taxes.