Ranger guards (guards with crossbows) cannot be pick pocketed. For example, the one near the west Falador bank.
Also, after engaging in combat if you attempt to thieve an NPC (before attempting to leave your current tile) you will be stuck in place.
Example; You attack a Market Guard, defeat it and click on a Master Farmer to pickpocket. You are unable to pickpocket the Master Farmer and are stuck in place until moving your character to another tile.