Apparently not, because right next to that Psalm that St. Paul quotes there is this:
A psalm of David. Lord, who shall dwell in thy tabernacle? or who shall rest in thy holy hill? He that walketh without blemish, and worketh justice: He that speaketh truth in his heart, who hath not used deceit in his tongue: Nor hath done evil to his neighbour: nor taken up a reproach against his neighbours. In his sight the malignant is brought to nothing: but he glorifieth them that fear the Lord. He that sweareth to his neighbour, and deceiveth not; He that hath not put out his money to usury, nor taken bribes against the innocent: He that doth these things shall not be moved for ever. (Psalm 14, your numbering may vary)
I think that once you understand this point, your confusion will clear up. GOD says that NO ONE is righteous, ALL have sinned and fall short of the glory of God. What He obviously means is Godly perfection - Godly holiness - Godly righteousness. This is impossible for fallen man to attain and without the Redeemer, we would ALL be lost no matter how humanly good, righteous or holy we are. David's psalm is speaking of that person who follows after God, who obeys what God commands, who loves God. But, no man could claim to be God-good, God-righteous, God-holy. Everyone has sinned. NO ONE is righteous before God. Jesus, alone, was the ONLY humanly perfect, righteous and holy person and that was because He was GOD. Mary is not God, Mary is a human, Mary's righteousness had to come FROM Christ's righteousness just like all those who will be saved do. He took ALL our sins upon Himself and died in our place so that we might be found in Him and become as righteous as Christ. That is the ONLY way anyone can be saved.