Although I totally agree with the original answer, this question could also pertain to Chapter 12: "The Minister's Vigil" at the moment when Hester and Pearl approach Dimmesdale on the scaffold in secret. Here, then, is an alternative answer to your question:
Although no one really approaches Dimmesdale "as" he invites Pearl and Hester to the scaffold, Reverend Mr. Wilson does approach right before Hester and Pearl appear. Dimmesdale has already mounted the scaffold and, therefore, is already being enveloped by grief and guilt. Suddenly, a glimmer from a lantern can be seen. "As the light drew nearer, [Dimmesdale] beheld, within its illuminated circle, his brother clergyman--or, to speak more accurately, his professional father, as well as highly valued friend--the Reverend Mr. Wilson; who, as Mr. Dimmesdale no conjectured, had been praying at the bedside of some dying man. And so he had" (146). Dimmesdale has a sort of panic attack and eventually wonders whether he had spoken aloud to Reverend Wilson. Dimmesdale did not, of course, as Wilson shuffles on by the scaffold "closely muffling his Geneva cloak about him with one arm and holding hte lantern before his breast with the other (147). The only other thing that happens before Hester and Pearl appear is that Dimmesdale imagines himself fainting on the scaffold as well as the resulting chaos the next morning. As soon as Dimmesdale awakens from his fantasy, Dimmesdale hears "a great peal of laughter" which turns into Pearl's laugh. Hester and Pearl then join Dimmesdale on the scaffold.
This is Roger Chillingworth. All he has worked for is about to be destroyed if Dimmesdale reveals that he is Pearl's father, and he does what he can to stop it from happening.
"Madman, hold! What is your purpose?" whispered he. "Wave back that woman! Cast off this child! All shall be well! Do not blacken your fame, and perish in dishonor! I can yet save you! Would you bring infamy on your sacred profession?"
"Ha, tempter! Methinks thou art too late!" answered the minister, encountering his eye, fearfully, but firmly. "Thy power is not what it was! With God's help, I shall escape thee now!" (Chapter 23)
At this point Dimmesdale, though his public confession, will be freed from the Leech, and Chillingsworth acknowledges it:
"Hadst thou sought the whole earth over," said [Chillingworth], looking darkly at the clergyman, "there was no one place so secret,--no high place nor lowly place, where thou couldst have escaped me,--save on this very scaffold!"
Dimmesdale is at last free, and ironically so is Chillingworth.