Treasure pops when -
3 minions are killed in one attack
A Captain is killed
A Lair is killed
The above is my understanding of the rules. Not sure about Minibosses yet.
The OP is specifically asking if an Ally kills one of those and not a Hero.