Occasionally when mine are into tugging at grass, this may happen if it doesn't come out with a bowel movement. That being the case, I gently pull it out BUT if there's any resistence at all, then I'd involve my vet.
You could try this BUT it has to be done gently. If there is any question of a sewing needle being involved, then you should get off to the vet - NOW. He will x-ray and if he sees a needle, he'll have to operate before it does untold damage, if it hasn't already,
With puppies especially you have to have eyes in the back of your head - and puppy proof your home.
I hope he'll be ok.