Definitely not worms. The yellow bits could be part of another malformed yolk, or a bit of tissue from the oviduct, basically a big meat spot. Either would be edible and not harmful, despite the yuck factor. Depending on the age of the bird, it could just be a random glitch, a glitch caused by getting ready to molt or from a new layer, or a brewing reproductive problem. I would just keep an eye on that bird (if you can ID who laid it) and see if it happens again. Hopefully it's just a glitch.