Jesus does NOT tell those people in Matthew 6 to basically keep on doing what they've always been doing, only make sure their hearts are in the right place. Nowhere in Matthew 6 does he say anything close to that. I am wondering what is so hard to understand about this:
"...your Father who sees what is done in secret will reward you."
It should be quite obvious that He is not telling them to abandon public observances since He Himself took part in public observances.
What he is telling the disciples is that when they take it upon themselves to personally do things that are above and beyond the public observances that they should do those extras in secret - unlike the Pharisees who did their extra observances publicly.
Ash Wednesday is not a private exercise of personal devotion - it is a public observance of the universal Church.