Not an easy question to answer because:
1. When a catholic,
It depends on if a catholic has been born again or not. And with rcc theology of being "in" Christ, or not being "in" Christ because of some sin a catholic has committed.
2. Is it grace causing the impulse...
It may be the Holy Spirit convicting the person of sin IF the person is not born again. Or it may be just the rcc heresy of a person losing their salvation, and that person is concerned with a sin all of a sudden causing a loss of their salvation and they are in panic mode.
3. Doing better in the future....
For God's glory or as a work for getting back "in" Christ? For sanctification in conforming to the image of Christ? Or as something to do to keep them from not being "in" Christ. With catholics never knowing the status of their souls they just never know really why they are doing works in the first place.
If a person has been born again by Grace through faith, which biblically, is the ONLY way a person CAN be born again then that person's salvation is set in God's word (in stone), that he or she will NEVER lose salvation. Jesus said that all given to Him from the Father, that He would lose NONE of them. All of a born again believer's sins, past, present, and future sins have been erased and have been nailed to the cross. A child of God will ALWAYS try to keep God's commandments, and will repent and ask forgiveness for sins. The problem with rcs is that the rcc keeps them from enjoying their freedom in Christ, and keeps them guilt ridden from never having the gospel preached or explained to them. So Catholics are left wringing their hands hoping just to make purgatory and hoping that they can there maybe clean up their souls and then somehow make it to heaven. When the gospel says, "There is NOW no condemnation for those who are in Christ Jesus...Rom 8:1
But back to your question of whether grace is causing the impulse or not. If one is born of grace, he or she will always be conscience of sin and repent. Not just when they run into a verse of scripture for we are kept by God's power and not ours.....1 Peter 1:5
I have always loved Spurgeons quote:
"You will never have peace with God, as long as you have peace with sin"!