Is it possible? Yes. It's a role-playing game. There are no rules against it, so unless the DM says no, you can do it.
Is it a good idea? Usually not. The most immediate reason is that players tend very strongly to take things like this personally. This is technically a violation of IC/OOC separation, but it is almost impossible to avoid, especially when taken by surprise. This can be mitigated, however: the most effective way is simply to negotiate everything with the players beforehand. As long as they can see it coming, many players -perhaps even most- actually find stuff like this interesting, and will often be willing to work with you. But it is imperative that you not surprise the other players with something like this, even if the goal is for their characters to be surprised.
However, even if you can get buy-in from the other players, there's another problem: the logistics of handling multiple parties working at cross purposes. Once you've betrayed the party, you've essentially formed your own separate party, and that is almost impossible to handle within a single session. The DM has to switch focus back and forth between the two parties, often for extended periods, and this just isn't fun for whichever players are "out of focus" at the moment. That's not so bad if it only happens once in a while, for only short periods, but you're talking about a permanent arrangement. It's a lot easier if you run two different sessions, one for each party, but then you're not all playing together anymore.
The bottom line is that while betraying the party can be good role-playing, it is usually not good game-playing. You can ask the DM and players for buy-in, but you shouldn't assume that they will accept, and you shouldn't try to take them by surprise. Even if you do get buy-in, you should be wary unless you know that this table has handled betrayals well before: some people turn out to not do so well as they had liked to believe they would.