Yes.
The grabbedDDI condition doesn't prevent you from attacking the grabber, so you can flank it if your ally is in the right position.
Grabbed. While a creature is grabbed, it is immobilized. Maintaining this condition on the creature occupies whatever appendage, object, or effect the grabber used to initiate the grab. This condition ends immediately on the creature if the grabber is subjected to an effect that prevents it from taking actions, or if the creature ends up outside the range of the grabbing power or effect.
Immobilized. When a creature is immobilized, it can’t move, unless it teleports or is pulled, pushed, or slid.
As you noticed the only condition that prevents flankingDDI is when either a flanker or the other is unable to attack (e.g.: lack of line-of-effect or impossibility to take actions).
Flanking. [...] Must Be Able to Attack: You and your ally must be able to attack the enemy, whether you’re armed or unarmed. If there’s no line of effect between your enemy and either you or your ally, you don’t flank. If you’re affected by an effect that prevents you from taking actions, you don’t flank. [...]