If you've pulled the head off a cooked fish you may have pulled out a section of the spinal cord from along the top of the backbone. It would be white and about spaghetti thickness in fish of that size I would guess. There are two kinds of worms I commonly find in the flesh of bream fillets. One is a tightly clumped bunch of fine yellow worms and the other is a long black thread usually in the back section of the fillet or in the flesh around the gut cavity. You can see one of them in the attached photo. The black ones will pull out quite easily if you get the point of a sharp knife under them. The yellow ones require the whole piece of flesh to be cut out. Neither of them would hurt you if you ate them in cooked fish but it's the thought that counts (especially in the case of the ladies).
Cheers Freeeedom