This happens all the time; the ethics vary by situation.
A different way of asking this question is to objectively ask what the effects will be on both companies (your current and your prospective new one).
Rules and Regulations
You also need to find out if there are any no-compete / anti-poach clauses within your terms of employment the existing work contract between the two firms. Both types of clauses are fairly common, and give legal recourse for your question.
If there's a non-compete clause, you can ask to be released from it by your current employer. They may or may not agree.
If there is an anti-poach agreement between both companies, you can again ask for an exception to be allowed. Sometimes, those clauses are there simply as part of the boilerplate that ends up in all the contracts.
Relationship Effects
Now you need to look at what the effects of your moving from current employer to new employer would do to relations between current and new companies. If your current employer is going to be incensed about your jumping ship to them, then it's unlikely that the new company will pick you up. What is "right" in this case is to maintain the existing relationship and make sure the contractual terms can be met.
OTOH, your current employer may see your shift as a net benefit. Maybe they want an "insider" with this trusted new provider. Maybe they're ready for you to move on as well, and would welcome the change. You won't really know until you start digging a little bit.
Process Going Forward
Start with the Tech Lead of the new company. Have a verbal conversation with him / her to verify they really are interested in hiring you. If you can't trust them to keep this on the down-low, then you may want to reconsider the company.
At this point, you could submit your resume to the new company. But you should immediately have an informal chat with your boss or boss' boss. Explain exactly what you've told us and get a feel for what their sentiments will be. This is where you are at greatest risk because they could take retaliatory action against you. But at the same time, you have to take this risk at this point in time if you want to keep the transition ethical. You may also find out that you're a lot more valuable to your current employer than you thought and you may end up with a new dream role. Hard to say - you won't know until you start the conversation.
There are a lot more check-points than you might like, and there will definitely be a window where you carry more risk than you may want. In retrospect, you may find that the risks weren't quite as bad as you thought. It takes any company quite a while to be able to terminate someone when there isn't an obvious wrong that's taken place.
Good luck.