I've noticed this many times before since many versions ago and can only consider it a bug.
Often times your ally will even send ducats to their rival while you are at war with said rival.
My assumption is, that the "target" for whom the AI sends money to is just wrong, I cannot believe this to be working as intended.
Would have reported it as a bug long ago, but it's a rather minor issue and at the time I never felt like it was worth my time reporting, considering the low chance of it being fixed - or people even telling me that it is "intentional"*.
*'My allies sending their rivals money because I'm at war with them' does not make any sense in a realistic way. And even for "game balance" or to make the game harder for the player it's just ridiculous. If nations with good relations towards the target supported them with money, that'd make sense, or if my allies helped me when I'm at war with someone they strongly dislike, that also makes sense. But helping another country, without regard for the relation, because the player is at war with them is just wrong.
Actually felt like, the worse their relation towards the target is, the more likely it is that my allies will send them money.