And I thought I was a fish junkie.
But, to answer your question, it was most likely a grub of some sort. It's not a preferred state of affairs but there's nothing you can do about it. Most likely it came in as a parasite in an originally stocked fish; maybe from the hatchery. Or maybe it came from a birds droppings. Will it hurt the fish? Who knows but you probably don't have any kind of real problem in the pond. If you want to eat the fish, just cut the grub out. If you cook it well, the grub won't bother you. We've all probably eaten cooked fish with grubs and didn't know it.
Bottom line: Don't sweat it.