Answer: rat-tailed maggot, family Syrphidae
As nicely described by one of my readers, David Bruce Conn, "This is a rat-tailed maggot, larva of a hover fly belonging to the family Syrphidae. This one may be of the common genus Eristalis. They are not parasitic, but typically live in stagnant water and feed on organic material before pupating. They may incidentally live in toilets and latrines."
The larvae are very recognizable, a long "tail" that contains a breathing tube (respiratory siphon) that connects to the tracheal system and allows the larva to breath oxygen from the water surface. You can also make out antennae and prolegs.
I should note that there have been a few reports of facultative myiasis by this group, but in further investigating these references, I couldn't find any definitive evidence that this occurs (the specimens were all brought in by the patient after being found in the toilet.) Therefore, I think that unless definitely proven, all cases of rat-tailed maggots should be considered incidental findings due to environmental contamination.