What to do if your dog swallowed a sock. If you're lucky enough to know that your dog ate a sock or other item, one option is to bring him directly to the veterinarian to see if the item can be removed from the stomach with an endoscope. This is an especially good option if your dog is small and the item is large.