You are probably thinking of the period 'Shrovetide' leading up to Ash Weds. The English term "shrovetide" (from "to shrive", or hear confessions).
"In the week immediately before Lent everyone shall go to his confessor and confess his deeds and the confessor shall so shrive him as he then my hear by his deeds what he is to do [in the way of penance]".
Repentance is ongoing throughout Lent so not just on Ash Wednesday. During the 4th century, penitents looking for forgiveness and re-entry into the community would dress in sackcloth and sprinkle themselves with ashes to show their repentance. This custom predates Christianity and is referenced in Hebrew scripture.
The distribution of ashes to everyone on Ash Wednesday came from imitation of the practice of wearing ashes by public penitents. As the rituals evolved, Lent more and more focused on the themes of repentance and renewal, Christians sensed their own need for repentance and confession became the norm, before, during and after Lent.