How to pin a distinct bone in a rig while animating
It all depends on how your rig is made. Here is one tip.

Add an empty to your scene.
Give it a name like ElbowRest-Empty.
Select your Elbow Bone in Pose Mode. Add a constraint "Track To" 
Select "ElbowRest-Empty" as target.

Now in object mode, where ever you move your empty, your elbow bone will follow.
You may need to lower the influence of IK to keep the elbow bone pinned where ever you want too.