This Does Not Look Like A Non-Competition Clause So The Public Policies Purportedly Invalidating The Contract Term May Not Apply
There is often a legal distinction between a non-solicitation clause in a contract between a vendor and a purchaser of services, and a generalized non-competition clause between an employer and an employee.
A non-solicitation clause prohibits a purchaser from poaching an employee who did work for the purchaser while with the employee's employer from hiring that employee to do the same kind of work directly for them. It is designed to prevent appropriation of knowledge gained from the specific vendor-purchaser relationship involved which is arguably a form of trade secret.
A non-competition cause prohibits the employee from working in the same line of work as the employer for anyone (at least in defined competing industries for a period of time in a certain geographic area). It is designed to prevent appropriate of the generalized knowledge gained from working in the same industry as the employer and deprives the employee of a livelihood in a way that a non-solicitation clause, which allows you to work for anyone but your former clients at your old job, does not.
The liberty considerations present in a non-competition clause between an employer and employee are much greater than those implicated in a non-solicitation clause between a vendor and a purchaser of services, so public policy often invalidates non-competition clauses but not non-solicitation clauses.
While I don't have the capacity to research Russian and Italian law on these topics with confidence, the assertions that you make about Russian and Italian law in the question, if true, do not convincingly establish that you are subject to an illegal non-competition agreement, as opposed to Company B being subject to a potentially valid non-solicitation cause binding upon it under the relevant law.
My strong intuition is that this agreement would be upheld by both Russian and Italian courts and that your employment would violate the law.
Also, even if breaching the contract between Company A and Company B didn't violate the law due to a public policy exception that makes the contract unenforceable, Company B might very well decide not to breach the contract in order to maintain a good relationship with Company A and a good reputation in the business world.
If I were you, I would not seek out this employment without a legal opinion from a lawyer under both Russian and Italian law confirming your analysis which I strongly suspect is flawed.
Footnote On Choice Of Law
It is also not clear from the facts presented whether Russian or Italian law would apply. One factor that would be relevant but not necessarily decisive, is whether the contact between Company A and Company B had a choice of law clause in it. Choice of law clauses are usually upheld, but sometimes public policy exceptions to contract law are enforced notwithstanding the existence of a choice of law clause.
In the absence of a choice of law clause in the contract, there are legitimate arguments to apply either Russian law or Italian law in this case.
Russian law ought to govern the relationship between an employer and an employee in Russia, and usually, in a contract for provision of services, the vendors jurisdiction rather than the purchaser's jurisdiction will be applied in the absence of an agreement because that is where the services are provided and the vendor with clients in many countries might otherwise be subject to inconsistent legal obligations.
On the other hand, given that your new employment relationship would be between an Italian employer and an employee in Italy, and that one of the issues is whether the Italian employer's contractual prohibition on hiring an employee in Italy violates Italian public policy, there is a legitimate argument to apply Italian law rather than Russian law to the dispute.
As a practical matter, more often than not, courts often end up applying their own law in gray area cases like this one, even though the reasoning used to get there can end up looking like sophistry. So, an Italian court addressing the issue is likely to apply Italian law, while a Russian court addressing the issue is likely to apply Russian law.
Now, it isn't obvious that Russian law and Italian law are actually inconsistent on this issue, so that may not matter. But, to the extent that the outcome turns on fine nuances of the exact wording of the relevant statutes, for example, it might very well matter.