I ran into this bug on accident and I'm not completely sure of the extent of the bug but will speculate at the end.
I set up my JSF starfighter as an Imperial and then I changed factions to Rebel. I did NOT redeed my JSF and now when i go into Kessel or Deepspace only the Reb ships (PC and NPC) are red to me and killable. I still use the reb deepspace station to get to kessel or deepspace but cannot shoot at imperial targets. However, I can be targeted by rebs and kill other rebs without any apparent drawbacks. WHILE STILL BEING A REBEL MYSELF.
I recently used this in a space PvP event in Deepspace to even the numbers when not enough imps showed up for the event.
I still have this bug and plan on keeping like that for now. I'm going to try and buy another JSF and set it up too to see if I can kill Imps in it.
Notes:
I went into deepspace and kessel with my JSF as an imp and I think that is important to make this work.
I can add/remove equipment from the JSF and that doesn't affect the bug.
Speculation:
I am guessing you can do this with a Bellbullab ship as well and maybe even a Naboo fighter since all pilot types can use them. However, this remains untested.