"God's Judgment and the Law
For all who have sinned without the law will also perish without the law, and all who have sinned under the law will be judged by the law. For it is not the hearers of the law who are righteous before God, but the doers of the law who will be justified. For when Gentiles, who do not have the law, by nature do what the law requires, they are a law to themselves, even though they do not have the law."
All have sinned, with or without the law. The law reveals sin, but does not save.
To do what the law requires by nature tells us that Paul is speaking of new creatures in Christ. It is a new heart and a new nature which are alone able to perfect man in the Lord. The important thing is to obey God rather than the law.