Perhaps try making two of those last sections, one in which it fires on West, and the other it fires on East.
Then you can set up a global variable like CivFriendly or something, and check it at the beginning of those sections. ie.
#CivOnEast
? (! alive _unit) : exit
? (CivFriendlyPlayer) : goto "CivOnWest"
? (vehicle _unit != _unit) : goto "hold"
; armed behaviour
? (_armam > 35) && (_unit knowsAbout player) > 1 && (side _unit != side player) : _unit doTarget player; _unit doFire objNull
goto "exit"
#CivOnEast
? (! alive _unit) : exit
? !(CivFriendlyPlayer) : goto "CivOnEast"
? (vehicle _unit != _unit) : goto "hold"
goto "exit"
You can then set that global variable sometime in the mission when you want it to change. ie. when the civilians go AWOL on East and join the player's side.
Also, I just tested this out in the editor, but not too extensively. I grouped a West soldier (player) to an East soldier, then created another East soldier situated ahead of us facing the opposite direction. Upon loading, the East soldier acted exactly like a normal West soldier, even to the point of identifying and SHOOTING the other East soldier from 100m away. Another test, this time with the East soldier BEHIND us, he shot the East soldier in my group.
Yet another test, a bit more relevant to your question.... I set civvies friendly to East, then did the same as above. I put a civilian on my squad, armed him with an AK47, and placed a guy exactly like him a few meters ahead. This time, for some reason, he didn't shoot at him, no clue why. However, when I placed an East soldier the other civilian's place, he immediately hunkered down and wasted him.
My conclusion is that any unit, regardless of side or affiliation, when grouped under the command of an opposing side, takes on that side's enemies and allies.
You might not even have to do the above code if you just put East-friendly civilians in a squad with East commanders.
I don't know if this grouping thing works with SCRIPT (unit join group) or if it only works in the editor. You'd have to play with it a bit more.