A unit that has been fired at and NOT suppressed as a result can op-fire back (assuming LOS etc), as can other friendly units with LOS & range to the firer.
If it's suppressed or KO'd then it can't.
Basically you don't op-fire until the outcome of the firing has been resolved (hits, armour saves, suppression etc).
KD