If they are flattened and squat in body shape (but elongate as they move), then they are probably planaria (shown in A)... if they are thin, long and squirm back and forth, looking, as my friend described them "like wriggling white cat hairs", then you probably have nematodes ( B ). Neither should exceed 4 or 5 mm in length.
Planaria are flatworms, related to the notorious tapeworm, but do not share their parasitic lifestyle. They are fascinating creatures often used in high school biology experiments because they will regenerate into two live individuals if cut in half. Nematodes are roundworms... they are one of the most successful and widespread group of organisms to populate this world (second only to bacteria... humans are far down *this* list)... nematodes are found from the far reaches of the polar ice caps to the hottest tropical forests to the depths of the ocean floor where no light has ever reached. Both types of worm are totally harmless to fish in themselves, and live on excessive nutrients in the tank.