This is possible if the contractor or employee creates intellectual property (IPR).
IPR includes many things:
There are two groups of IPR rights: property and non-property. We are only interested in property, because only they can be transferred. Property includes the right to use IPR itself, as well as to allow or prohibit someone from using IPR.
If the employer / customer does not take care of the correct contract, the property rights to the IPR may remain with the employee / contractor.
What does it mean?
the contractor will be able to sell the IP again to anyone;
the contractor / employee will be able to claim compensation for the use of IPR from the clients of his customer / employer;
the contractor / employee will be able to block the work of his customer's / employer's clients.
Such an employee / contractor will be especially valuable to your competitors.
What work to prevent this from happening?
clearly stipulate in the contract with the employee / contractor that all property rights to the IPR are transferred to the employer / customer;
to establish the moment of transfer of rights to IPR;
determine the procedure for payment of compensation for IPR. If it is included in the contractor's salary or remuneration, this must be clearly stated in the contract.