With the added pictures, it looks like an Ascaris or roundworm. The enlarged head appears to be part of it that got bound up and gunked up in the colon. Ascaris can be very pliable/flexible and at other times come out 18" long, but break apart when manipulated. I think it depends on the state of decomposition the worm is in.