I don't agree that this statement (that committing sin is contrary to human nature) is the basis of natural law. Natural law is a consequence of the way God constructed humans and the rest of the universe. It's what makes it wrong, for example, to kill someone; and we call it natural because everyone knows it, even if God hasn't directly revealed it to them.
Still, Thomas did agree that committing sin is contrary to human nature. Did that make him a Pelagianist (that is, someone who believed that humans could overcome sin by their own efforts)?
Thomas was far from a Pelagianist; in fact, he cites Augustine in opposition to it:
According to the Catholic Faith we are bound to hold that the first sin of the first man is transmitted to his descendants, by way of origin. For this reason children are taken to be baptized soon after their birth, to show that they have to be washed from some uncleanness. The contrary is part of the Pelagian heresy, as is clear from Augustine in many of his books.
(Summa Theologica, First Part, Question 81, Article 1)
But he could consider both humanity's fallen, sinful state and also the original, righteous state. He described original sin as
an inordinate disposition, arising from the destruction of the harmony which was essential to original justice, even as bodily sickness is an inordinate disposition of the body, by reason of the destruction of that equilibrium which is essential to health.
(Summa Theologica, First Part, Question 82, Article 1; emphasis added)
Thomas believes that humanity was endowed with "original justice", which he describes as "man's will being subject to God" (Summa, First Part, Question 82, Article 3), but that humanity lost this through the sin of Adam and Eve:
we must explain the matter ... by saying that all men born of Adam may be considered as one man, inasmuch as they have one common nature, which they receive from their first parents; even as in civil matters, all who are members of one community are reputed as one body, and the whole community as one man. Indeed Porphyry says (Praedic., De Specie) that "by sharing the same species, many men are one man."
That is, when Adam and Eve sinned, they changed forever the nature of humanity—they changed what a human being was, spiritually. It's for this reason that all those descended from them have this damaged spiritual state.
Thomas thus believes that "committing evil does not accord with human nature"; and he believes that in humanity's original state (before the Fall) we were able to act in accord with our nature. He believes that the Fall diminished this natural propensity to adjust one's desires in accord with God's will; and not only for the original sinner, but for all those descended from him. He does state that the ability cannot be destroyed entirely, since it is part of our nature,theoretically available to all those with a rational soul:
the good of nature, that is diminished by sin, is the natural inclination to virtue, which is befitting to man from the very fact that he is a rational being; for it is due to this that he performs actions in accord with reason, which is to act virtuously. Now sin cannot entirely take away from man the fact that he is a rational being, for then he would no longer be capable of sin. Wherefore it is not possible for this good of nature to be destroyed entirely.
Nevertheless, this availability is only in theory (as being part of the nature of the soul); it is not regularly available to us, because this original justice with which God gifted us has been entirely taken away (cf. Summa, First Part, Question 82, Article 4). We can avoid sin sometimes, but never as a matter of course. We've lost most, but cannot lose all, of our ability to act according to our nature.
Thus, it is true that we have a nature which was designed to exhibit a natural justice and propensity to follow God; it is in this sense that "committing evil does not accord with human nature". However, when Thomas considers "Whether man can rise from sin without the help of grace" (First Part, Question 109, Article 7), he concludes:
For since the lustre of grace springs from the shedding of Divine light, this lustre cannot be brought back, except God sheds His light anew: hence a habitual gift is necessary, and this is the light of grace. Likewise, the order of nature can only be restored, i.e. man's will can only be subject to God when God draws man's will to Himself, as stated above. So, too, the guilt of eternal punishment can be remitted by God alone, against Whom the offense was committed and Who is man's Judge. And thus in order that man rise from sin there is required the help of grace, both as regards a habitual gift, and as regards the internal motion of God.
That is, without the grace of God, humans cannot themselves overcome the propensity to sin which is the manifestation of original sin.