This is purely a contractual issue in the US. In Germany it can be statutory but in the US it is in the detail of the contract. Usually an employment contract will specify the outside appointments one may enter into, if any, and the means for getting approval. Some institutions are liberal and others far less so. I know a Duke Univ professor running his own hedge fund, and a UCL professor running a computer-assisted fashion design company out of his office (literally, as in his business partner sits in an extra seat in his office). But many institutions have a problem with this.
It is best to check the detail of your contract and if there is any conflict to be up front about it. It is a very small amount of money involved compared to the legal and potentially reputational burden which may ensue. If you have questions it is possible to consult employment lawyers who specialise in these matters. Unlike regular contract, there are many terms which are not viable or not enforceable depending on the jurisdiction.