Student or Learner
"They'll hold him for questioning as long as they can -- which means they'll have to put up with me too -- and possibly even try to arraign him. But unless they have a judge in their pocket they won't get away with it."
Is it saying if they (police) want to arraign this person, they must get a judge's permission?
'to have someone in one's pocket' means you are paying them to do something for you, usually something a little illegal. For example,
The drug dealer didn't get caught, because he had the police in his pocket. The police never went to his part of town because he was paying them not to.
The restaurant passed the health inspection even though there was a rat in the soup. I guess the owner had the inspector in his pocket.
'the pocket' means your wallet, where you keep your money. There are some other phrases like:
'get your hands out of our pockets' -> stop taking my money (for taxes or rent).
Have a happy holiday!