Not a valid solution. "Non-allied" does not mean "want to fight". It also opens up some exploits.
Note that this only happens with rogue peasant mobs in rogue regions. The peasants are the region owners, which makes them automatically the defenders. And since everyone is at war with rogue, who is the defender, they all join together to bash on the defender.
As Tim says, solving this is a non-trivial problem.
How's this for a solution: split regions from troops into two different "realms". Regions can be part of realm "(anarchy)", and troops part of realm "(rogue)". Thus, rogue troops are never considered the region's owners.
On second thought, I don't think this would prevent rogue troops from being the defenders by being there first, and thus triggering this behavior anyways...
Perhaps a better solution would be to enable "the overwhelming attackers surround and disperse the defenders", instead of overwhelming attackers only?
Actually, I think that combining all of that something workable may be possible:
1) split rogue troops from rogue regions into two different "realms".
2) make it possible for defenders to be overwhelmed, much like it can be the case for attackers, when the defenders do not actually own the region they are defending.
This would mean that defending your own regions would continue to work as intended (no dispersal for defenders, only for the attackers), while making it so that tiny rogue or foreign units could not prevent clashes between large forces.
Additionally: maybe code it in so that rogue troops never side with anyone, and stay out of fights. Doesn't really make any sense to fight alongside undead and monsters.