This has happened to me before, and it is vexing enough that I'm posting a cranky feature change request.
The new econ and research treaties were a gratifying step towards making the diplo portion of GC2 a stronger part of the game. But, if you have an ally who is attacked by an unallied AI with whom you have a treaty, you have no escape from getting a black mark on your diplo history. Either you break an alliance or you break a treaty, only you had no info about or influence over the relevant AI decisions.
Here's hoping that the TA schedule has time for a change like this.