Rule wise a character is defined as the ship on an account. Each account can contain five characters. Each of those characters can only be in one official faction.
The rules do not define what a character is in role play. In role play a character usually has more than one ship (character per the rules) at his disposal. Sometimes in role play a character is part of different factions for various reasons, which means he has ships (characters per the rules) that are in different factions.
A ship cannot be in more than one official faction, seeing as the rules consider that ship a character. There is no rule stating a character in role play cannot be. Just means a ship can't have two tags and it means the role play character must act like the ID/IFF he is currently using.
My LSF character is part of the =LSF=. He could join the Liberty Rogues official faction and I wouldn't have broken a rule. The rules come into play when I log in. If I log into my =LSF= my character must act like an LSF Agent. If I log into my Rogue, he must act like a Rogue. I must act in accordance with the ID/IFF that I am using at the time. That doesn't mean my character can't report back to the LSF about his actions while under cover.
TLDR: Yes it is perfectly okay so long as you do it properly. Meaning you can't have a ship with two tags and when you log on, your character acts like the ID/IFF of the ship he is currently flying.