Is it ethical to take external consultancy jobs during a fully funded PhD programme?
Some universities have policies against funded PhD students doing other paid work. You may want to consult the dean's office (or the equivalent authority at your institution) about this before you sign a contract for a second job (albeit temporary), since there may be serious repercussions such as the termination of your funding.

Your funding may also be coming from a grant which somehow prohibits another income source. This can be unbeknownst to you, arranged by your professor or school, which may be strange and perhaps even unethical, but not impossible and not unheard of. I have seen more than one grant agreement where an "obligation of the researcher to work exclusively for the project" is explicitly stated.

Thus, before you accept the job, make sure to ask your advisor and your dean if there are any conditions which would prohibit you from doing so. You don't have to be very specific about the offer you received. I would say you don't have to hide the facts either, but there are many flavors of advisors and deans so I won't comment further on how you communicate with them. Just make sure to ask.