The problem is, if you deny the ranger the chance to IC act and stop the rogue, then YOU are OOC denying him that option.
If the ranger stops the rogue, it's all IC.
Just be careful how that develops. If everyone takes it in good fun, no problem, but some players can take this stuff personal.
Anyway, here's how I would do it:
Depending on how it was RPed, I might allow the Rogue a stealth or bluff check, and the Ranger a Perception/Sense Motive to see if the character even realises what the other is doing.
Have them roll initiative. Ranger can then try to grapple the rogue, or take him out with non-lethal or something. If the rogue manages the CdG, well he succeeded. If not, then not.
Remember CdG is a full-round action that provokes AoO, so he can't move to the prisoner and kill him in the same turn.