Earlier quoted context omitted.
because the ip belongs to the company because presumably he developed it during working hours using the company's resources.
Only if the contract says so. Since it wasn't a development job, there's a chance that clause isn't there.
No clause or contract is required for this to be the case. It's the default state. It might be different in other countries but I doubt it.
Employees have a "duty of loyalty". https://www.google.com/search?q=employee+duty+of+loyalty
That would seem to include things like this issue. It also includes not competing with your employer.