Earth worms are not parasites, they get their nutrition from organic elements in the soil. In return, their castings, waste products, nourish the soil so more plant life can grow and keep feeding the worms as they breakdown and decay. Earthworms also aerate the soil so water and nutrients are more easily assimilated by the plants. Its unlikely you will ever have an earthworm inside you unless you eat one. They can't live inside humans.
Parasites are creatures that get their nourishment from you. They can either latch on to the intestinal wall, or simply set up housekeeping there and live off what you eat. There are a few who see parasites as beneficial because they also consume waste and toxins, but most believe its best to get rid of them and clean up your diet and make your gut inhospitable to worms and flukes. Most worms would rather have a glass of chocolate milk or a Fig Newton than broccoli or an orange.