Your contract may or may not make this ownership issue clear. The laws in your country may or may not make this ownership issue clear. However, that's all irrelevant. If anyone at the company feels that the company ought to own your product, then it gets very sticky, uncomfortable and possibly expensive.
And you really don't want to end up without job and side project.
That's my tangential advice.