In a word, yes. See here where among other things you can read this:
The Church's Treasury of Grace
The Catholic Church is able to grant indulgences because she draws on the infinite merits of Christ, Mary, and all the saints. Blessed Mary of Quito, a Spanish nun, saw in a vision a vast treasure, which, God explained to her, symbolized the graces and merits of Jesus (the treasure of the Church!) from which indulgences are taken. These graces and merits can be obtained by anyone who fulfills the conditions, usually quite easy, for receiving an indulgence. People who don't bother to take advantage of indulgences are like travellers passing through a field full of precious jewels, who don't even take the trouble to bend over and fill their pockets, even though they know they will need these treasures when they reach their destination.
The Church was given the authority to grant indulgences by Jesus, when He gave St. Peter the keys to the kingdom of Heaven. "I will give you the keys of the kingdom of heaven, and whatever you bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed in heaven." (Matthew 16:19) In modern-day language, Jesus might have said, "I am giving you the P.I.N. to my heavenly bank account."
In the fifteenth and sixteenth centuries, the Church granted indulgences for giving alms to help build the beautiful cathedrals which were being erected at the time. This unfortunately led to the wrong idea that the Church was selling the indulgences to make money. As a result, the Protestant reformers of the time completely rejected the doctrine of indulgences as an abuse of the Church's power. They were mistaken; even though some abuses did occur, the Church's power to grant indulgences comes from God. However, they were right in that you can't simply buy indulgences like "quick-fix" medicines for your soul! You have to have the proper spirit of sorrow for sin to benefit from the indulgence.
I often find myself thinking, the RCC doesn't really teach what we think it teaches, does it? And then I check and discover, hmmm....., actually it does.