to be involved in or connected with two different or opposing groups
have / keep a foot in both camps
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition