Interesting pictures and welcome. Trematodes are different from nematodes. I'm certainly not an expert!
In viewing your pictures it is very difficult to tell what you have only because I can't see any segmentation which would be an identifier. I noticed that the measuring tape goes up to approximately 18 inches and the worm is brown. You might be dealing with an Ascaris or nematode problem instead, because they do grow that long and be as thick as a finger. Again, it is hard to tell given the photo as an identification. There are various trematodes that people can be infected with; people have been known to be infected with pig, beef, or fish trematodes.
As far as mucoid plaque I'm familiar with the information on it it but don't have much experience in the area.