Pull the pocket out as much as you can (or with jeans, just turn the pants inside out to get to the pocket) then put the pocket in a bowl of hot water with a squirt of dish-soap and leave it set overnight. It the morning the taffy will be dissolved (if not, leave it set for a second night) Then pour liquid laundry detergent on the area & wash as usually would. You can use a toothbrush to scrub before laundering if you'd like.
This sounds like a hassle, but it's not. The water will always dissolve the taffy or any hard or sticky candy. To speed up the process, it helps to start out with boiling water and replace with more boiling water after several hours.