It was like a scene in a science-fiction movie. The dog had a swelling under its arm with inflammation and a small hole in the center. Just inside the hole you could see something small moving. Very carefully we used a pair of hemostats to gently grasp the object and start to pull it out. We place the object on the table and see a fat larval creature wriggling around. It was like the ceti eel in Chekov's ear in Star Trek II: The Wrath of Khan.
As odd as this sounds, it's not uncommon to vets, especially those who practice in rural areas. These "worms" are larvae of a type of fly called cuterebra. More commonly these are referred to as "wolf bots". The larva comes into contact with an animal's skin and burrows underneath, or into an orifice such as the eye or the nose. It remains there and grows, eventually molting into a fly. While in its larval stage it can get up to over an inch long and can cause a lot of localized inflammation and infection. They can infect just about any animal, but are most commonly found on dogs, cats, rabbits, squirrels, and other rodents.
Thankfully, once these are noticed they are usually easy to take care of. A veterinarian is usually able to remove these from the hole, and then it's a matter of cleaning and disinfecting the wound and putting the pet on antibiotics.
Here are a couple of videos I found of cuterebra larvae in animals. Don't watch these if you're not prepared to be a little disgusted.
Though this is usually simple to fix, don't ever try to remove them yourself. If the larva ruptures while in the animal, there is a chance of a serious allergic reaction and even anaphylaxis. If you see something like this on your pet, be sure and seek veterinary assistance.