I am currently at the start of my career, and took a job at agency A a few years ago. I like my job and boss at agency A, a year ago we concluded that instead of being directly employed at agency A, I should be employed at company B, which leases me to agency A (this is typical in my department, the main reason behind this is that A tries to form better connections with local companies). I am now employed at B, but all my working hours are still at agency A. I still like my job, I am payed mostly by agency A, which pays company B to employ me (again, this is a typical setup). Next to my agency duties I actively try to search projects that A and B can do together, which is the reason why B agreed to employ me.
The problem here: one of my current projects involves dealing with company C, a competitor (not really, they operate in the same field, but offer different products) to B, but I know that the people at B do not like company C (in my opinion this is mostly based on envy, not on practical reasons, their fields of intrest mostly don't overlap that much). I have told my boss at agency A that I do not feel comfortable working with C when I know that they do not like B. I actively tried to convince my boss at agency B to instead hand over the project partly to company B (I don't think they would be the ideal partner for this project, but the project could be done in a cooperation between B and C, which is what I proposed. B could not do it alone, C can), he was okay with that, but that attempt was stopped by his boss.
Am I overthinking this? I would like to continue working at agency A, and raising that concern to B could lead to problems on both ends (and I do not think my boss at agency A wants that). Both A and B are happy with my current work as far as I know. I want to disclose my work to C to so that both ends are happy. How should I do this? Moreover, both A and B want a good and productive relationship which each other.