A veterinarian should handle intestinal blockages professionally since a complete blockage can be very dangerous and it is not easy to determine the extent of the blockage.
However if you wish to administer first aid to ease pain and possibly get the object to move gradually through the gastrointestinal tract and out of the dogs system you can use a few drops of mineral oil.
Using your dogs weight as a guide determine the safe and appropriate amount of mineral oil to administer. Do not pour mineral oil directly into your dogs mouth since this will cause aspiration. For every 10 pounds use 1 tablespoon of mineral oil. Rather than feeding it directly to your dog mix it with his food.
In about 6 to 8 hours constipation should start to subside but if it does not you should take your dog to the vet right away. Adding more mineral oil to your dogs food can make matters worse as an overdose of mineral oil can cause constipation and worsen the situation.
Do not try to force mineral oil to work because it does not always work. Try to help your dog through the painful condition of bowel obstruction but also be alert enough to recognize when a vets expertise is needed.
Check your dogs breathing rate heartbeat and behavior to make sure he is physically stable. Please take him to the vet as soon as possible if he is not eating is lethargic vomiting and is depressed.