In general, I very much agree with you for the very reason you mentioned. For area attacks, this is stipulated crystal clear in the rules: “If an allied unit is the target, the attack is resolved by the enemy player as if they owned the attacking unit” (p. 17). This basic idea ought to hold true in the context mentioned by you.
However, I am not sure, if there is any other case apart from area attacks where a unit might attack an ally. Currently, such a situation can come up if flying units evade. Yet, I just looked it up and realized, it is a mistake. “ The attacker can choose a different target” (p.20.). I am unaware of other situations, but if there are - as I said - I agree with you.
By the way, there is a similar situation in my opinion when it comes to tossing an enemy unit into lava. “The controlling player must then move the unit to an adjacent non-Burning area of their choice” (p. 21). I made a report since in my opinion controlling refers to the one controlling the movement, aka the enemy.