Well, it is implied rather than directly taught, but it holds logically. The only souls so separated from God that their ability to pray is affected are those who have unreported mortal sin on their souls. All earthly souls, even those in mortal sin, are required on pain of mortal sin to pray the Mass, so it appears that no one while alive completely loses the ability to pray, or is excused from the obligation to pray.
Thinking about the souls in Purgatory, it is true that they are not perfect, but then neither are you or I and we are certainly both able and obliged to pray. And the souls in purgatory ARE in a state of grace, meaning free from the mortal sins that affect our ability to pray. So it doesn’t stand to reason that they would by reason of their venial sins be unable or unobligated to pray.
I think their proximity to Christ the High Priest might make their offering the Mass redundant though, as it would have been for the Apostles to do so at the Last Supper.