If you manage to get your dog to your vet very quickly after they have swallowed something that they shouldn’t have, they may be able to give them an injection to make them sick. This does however, depend on what they’ve swallowed – your vet wont do so if it isn’t safe. Never try to make your dog sick at home.
If your dog has developed a gut blockage, it’s likely that your vet will admit them into the veterinary hospital for x-rays, a scan and possibly surgery. It’s likely that your dog will need to be put on a fluid drip and given other medications such as pain relief and antibiotics. Your dog may need to stay in the veterinary hospital for a few days while they recover. If the item they have eaten is very large, sharp or spiky their guts may tear and cause an infection (peritonitis) - see image below.