"...for when Gentiles, who do not have the law, by nature do the things in the law, these, although not having the law, are a law to themselves..."
In the above passage, and surrounding words, Paul had a purpose in mentioning both the Jewish law (law of Moses) and the "law to themselves" (for the Gentiles), but neither of these was his final point. He was using both of those things to show how the whole world is guilty before God. He brought up neither of these two "laws" for the purpose of saying that we are under them, but rather for the purpose of saying, "see, the entire world is guilty - not just the Jews, who have the law, and not just those Gentile 'sinners' - but all, everyone, nobody excluded.
I often feel is necessary to point out that Romans 2 should not be read by itself, but rather it should be read along with at least Romans 1 and 3, in order to understand the full gist of what Paul is saying. (I also think that Romans 4 and 5 is based upon the full gist of what Paul is saying in Romans 3, but that is for another day).
Check out Rom 1:16-17 AND Rom 3:21-22.
In 1:16-17, Paul writes:
"For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes, for the Jew first and also for the Greek. For in it the righteousness of God is revealed from faith to faith; as it is written, 'The just shall live by faith.'"
His point about "the gospel" is that in it, the righteousness of GOD is revealed. This is in contrast with the righteousness of man, which is filthy rags. And so, during the entire second half of Romans 1, as well as all of Romans 2 and much of Romans 3, Paul makes the case for the (un)righteousness of man.
In doing all of that, he leads up to Rom 3:21-22, where he finally gets back to his "righteousness of God" point:
"But now the righteousness of God apart from the law is revealed, being witnessed by the Law and the Prophets, even the righteousness of God, through faith in Jesus Christ, to all and on all who believe."
Keep on reading, and see that he now stays on this point, that it's all about God's righteousness that we've been given as a gift, and not about law or man's attempts at righteousness.
To summarize, the reason Paul even brings up the law at all is to show how it only makes everyone guilty, whether Jew or Gentile, whether the "law of Moses" or the "law unto themselves" (or "law of conscious"). Paul's points are these: 1) ALL (Jews and Gentiles) have sinned and fallen short of the glory of God. 2) ALL can be given the righteousness of God (not just Jews) - "to all and on all who believe."