IMO, the cost of performance would probably be light, as the game already calculate stuff to know if it hit a pawn or not. It's also just now and then, not a thing that need to be check every few tics.
Could be just having your pawn check line of fire when he is aiming, and stop before he shoot (at half aiming time or whatever, maybe skilled pawn could stop up to 0.1s before shooting and low skill only 1s before shooting) if he see a friendly pawn in a direct line of fire. Put a little sign over his head to show he stop fire, then the player just have to pause, check why, and adjust the battlefield by either moving his pawn, or aim at somebody else, or keep firing regardless. With a toggle like discussed before.
That leave the possibility of friendly fire here - especially with low skill (as they doesn't check right before shooting), and with usual bullet that go behind the target or too far on a side.
That could make the fight more enjoyable instead of the "pause every frame" we have right now with a full check manually of every line of fire in every single instance where a gun/turret is involved. We already have some stuff done for the hunting problem and the possibility to have pawn flee on sight (so if they are chased they have less chance to be killed by friendly fire while attacked in melee, as they would NOT be in melee).
We already take a good chunk of time to look at every battlefield, place cover, use them', use different kind of weapon, armor, pawn trait/skill, mood ... I highly doubt that having some help to deal with this kind of friendly fire would harm the gameplay in any way.