Otherwise, if its a classic "Here is a salary and package, we own all your relevant ideas from here on" deal, I'd say that is highly unethical behavior on the company's part, and is a case of wage theft.
Should the employee be barred from moonlighting too? Not unless the company is willing to pay for said time.