This isn't the sort of question suited for SO, but with that said, I'll throw you some quick points before it gets closed or migrated.
Firstly, you would need to consult a lawyer. There is no substitute for speaking with someone who can provide you with correct advice rather than the random mumblings of most people online.
Anyway... Employment Law is pretty complex, especially when it comes to Intellectual Property Rights.
For example, if you are employed by a Manufacturing company to create some Wonder Design, then discover the perfect design in your own time, your employer will generally (without an agreement pointing otherwise) be the owner of any Copyright in the works which you produce.
Also, you would need to determined if you are actually employed by this person who you have done work for. Just because you call him your employer, does not mean that he is in fact your employer. In fact, even because he pays you in renumeration for work you have completed, does not mean he is your employer. This is all pretty complex stuff too and it all boils down to contracts, the length of the work you completed, how you received your money, your tax obligations, etc.
Additionally, the fact that you have included this preexisting code into this project does not mean that you relinquish any Copyright in your work.
You are still the owner of the Copyright in your works, however, you will have most likely granted an implied licence to use your work since you have included it in this project.
This of course, is making the assumption, that the work you carried out, has assigned all Intellectual Property Rights in this person who hired you.
It might actually be the case that you were paid for work, but you retain full IPR and you have just granted a licence to use the software which you have developed.
If I was to offer my non legal opinion based on what you have provided so far,
I would say that this person is your employer, and that the Intellectual Property Rights in the work you have created thus far is held by your employer.
You have Copyright in the work which you yourself have created, however, you will have granted an irrevocable implied licence to your employer to use your work, and additionally any chance which you now make on this project will belong to your employer.
Also remember, you can have Copyright in even infringing works of Copyright. And just because you have Copyright in something, doesn't always mean that it is enforceable.
I would recommend that you:
- Dig up your contracts
- Create an agreement with your employee that recognises that you are grantee free use of your own code for this project, however, it should also be noted that any work that you do in your own time is your own work.