Can a girl get pregnant from sperm on a toilet?

No. No, because there would be no way that they could get up into the vagina. A old wive's tale for sure.
Very doubtful. The sperm has to this be smeared on the out of her vagina to have any possibility of conception if the ejaculate is fresh.
Very unlikely. Sperm cannot survive for very long outside the body. To get a girl pregnant, a large quantity of the sperm would have to have been deposited very recently and then come in very close contact with her vagina. A situation that seems unlikely to occur by accident.