If something came out it sounds like some kind of larvae. Somebody's pup on here had this too a while back. Sometimes the dog will get an open sore (for whatever reason) and then a fly will lay eggs in this sore. Please go to the vet asap!

Better to be safe than sorry.
PS. If your vet makes you feel like an idiot for trying your best to take care of your pup, get a new vet.