In the story, the Buddha encounters an Untouchable in passing. The man pardons himself and begs for forgiveness for crossing paths with the Tathagata. But the Buddha sees no reason to grovel and takes the man to the river to wash him before welcoming him into the community of monks.
I don't recall where I heard this. The closest I can find in the Tipitika is Theragatha 12.2, according to which the Buddha welcomes Sunita the Outcaste into the Sangha. There is no mention of washing in the river.
"Through austerity, celibacy,
restraint, & self-control:
That's how one is a brahman.
He is a brahman supreme."
The Vasala Sutta echoes this sentiment:
"Not by birth is one an outcast; not by birth is one a brahman. By deed one becomes an outcast, by deed one becomes a brahman."
As does the Assalayana Sutta:
"What do you think, Assalayana? Is it only a brahman who is capable of developing in any direction a heart of good will — free from animosity, free from ill will — and not a noble warrior, not a merchant, not a worker?"
"No, Master Gotama. Even a noble warrior... Even a brahman... Even a merchant... Even a worker... (Members of) all four castes are capable of developing in any direction a heart of good will — free from animosity, free from ill will."
"So what strength is there, Assalayana, what assurance, when the brahmans say, 'Brahmans are the superior caste... the sons & offspring of Brahma: born of his mouth, born of Brahma, created by Brahma, heirs of Brahma'?"
Among others. Yet the washing of an Untouchable in the river is no where to be found in my search for the source. Nonetheless, just as a lotus springs from a muddy pond, so too can those born of low social rank rise to arhantship. Does this metaphor belong anywhere in the Pali Canon?