I am very concerned about this part:
I will not be allowed to be payed for my work (school rules)
What rules are these? This isn't an idle question - what rules prevent you from being paid determine the possible penalties for violation.
If you are, for instance, in a foreign country on a visa that limits your payment or employment, working as a contractor in violation of those rules could have some very serious consequences. Depending on your country and the specific policies, this could go all the way up to cancelling your visa and deportation. This is certainly true in the US, and comes with other requirements:
Students and Exchange Visitors
Students and exchange visitors may, under certain circumstances, be
allowed to work in the United States. They must obtain permission from
an authorized official at their school. The authorized official is
known as a Designed School Official (DSO) for students and the
Responsible Officer (RO) for exchange visitors.
Unless the professor (or you) commits tax fraud, the government would have ample opportunity to find out - so certainly don't chalk it up to "they probably won't find out" if this is your situation.
There are other possibilities, including being prohibited from working due to scholarship/fellowship/assistantship. Violating those rules could mean anything from being required to return the money, to having your agreement cancelled quite suddenly.
The other possibility is that as an employee of the school you are limited to a certain number of hours, such as under insurance restrictions (Obamacare in the US). Going over this amount means the school is fined quite heavily (a few thousand I believe is the minimum fine), and violating such a rule could land both you and the professor in trouble.
Another possibility is the program prohibits you from unapproved employment outside the program (pretty common with PhD programs in the US). Violation of this without permission could be something the program turns a blind eye towards - or it could give them full authority to dismiss you as a student and/or cancel your funding.
It's not clear from your question if the professor knows or understands why you are being prohibited from receiving payment, but I would urge you to make sure you understand what the rules are and communicate them to this professor as well. Regardless, remember that you are ultimately responsible for following the rules that apply to you, and "the professor said it was ok" may not be sufficient to protect you from negative outcomes in any way.
This arrangement ultimately could be acceptable, but please find out the potential risks in advance!