I think the top photo looks like a tubifex-type worm. The bottom one is a flatworm.
I really wouldn't worry. There are so many small invertebrates in aquaria that people don't know are there. The vast majority are harmless. As Nymox said, they are there because there is food, and the food is fish/plant waste. That makes them useful.
A lot of people freak at finding unexpected critters. Remember, the aquarium is not and never will (or should!) be a sterile environment.
Yes, fish eat mosquito larvae and almost any other critter that lives on, in or near water. If it doesn't taste good, they spit it out. They didn't spend a couple of billion years of evolution eating Wardley fish flakes
You will probably never see a parasite off a fish. They live inside and release eggs to the outside world.
Seriously, just see these things and say 'hey, I am doing a good job, my aquarium actually supports life!' 8)