Let's follow the context:
Chapter 5: when there is no commandment to break, nothing has been broken. Sin has not been "committed." But death in the world was evidence that sin has existed (and remains) since Adam. After comparing Jesus with Adam 5 times, he introduces the real purpose of the law: an instrument to magnify, for us, the reality of sin. But grace, over and above the law and the resulting magnification of sin, is greater. This leads us to think that sin will always be with us and grace will always be there for it.
But precisely to counter this thought, Paul writes 6. In it, he reminds("don't you know", "we know that" 3, 6, 9) his listeners that faith in Jesus inherently meant a unity with Jesus in His death and resurrection for the purpose of freedom from the power of sin (end of 6.4, 6 and 7). Because of this liberation, we are to believe we are "dead to sin but alive to God in Christ Jesus" (6.11). The logical conclusion for him, then (in 6.12), is that we have authority over sin. He's echoing 5: In Adam, death reigned, but in Christ, we do (5.17).
And then, 6.14, the heart of Paul's point: "For sin shall not be your master, because you are not under law, but under grace." But Paul knows he has opened a can of worms with 14, "not under law, but under grace." Until this sentence, Paul has only talked of law as the standard that proves our need for grace. This is new (and dangerous) teaching; so he immediately counters that no longer being under the law (and being liberated from sin's power), we are free to live for God, for His righteousness (22). His reminders: "You have been set free from sin and have become slaves to righteousness" (18). And again, "But now that you have been set free from sin..." (22). And he'll say it again in 7.6: "But now, by dying to what once bound us").
He knows this will be a shock to his Jewish brothers. This is why he writes 7: first to clarify how death to something frees us from it (why the same act - marriage - can be either evil or good depending on death). And then, he links his example to a shocking truth: through Jesus, we have DIED TO THE LAW. This is the first time he has gone so far. He has said, "we died to sin" in 6.2, and now "you also died to the law" (7.4). Of course he immediately points to the purpose: fruit to God and serving God in a new way (by the Spirit), but the sting for the Jew is still painfully real.
Paul, are you blurring together sin and the law?
Clearly distilling the two is the point Paul will make through the rest of the chapter. He is doing nothing less and nothing more. He uses the present tense to bring to life his point, not to contradict everything he has worked so hard to explain. Sin was in us before the law, and its result has always been death (5.14). Like a hive of bees it remained an undercurrent in our experience. We wished we had our neighbor's car or their life or wealth. We cannot even imagine contentment. We cannot imagine that we are doing anything wrong or displeasing to God; the thought never entered our mind. If we had no neighbors, the thought would never have come to us, but the source of it has always been there. Now comes the law. It is a stick that has prodded the bee hive. It is a magnifying glass that has suddenly shown us how abhorrent we are; how displeasing we are to God. But deeper, having a law, a rule, a command that says, "Do not covet," has aroused the worst in us. It has shown us how enslaved we are to desire. We cannot live in a world where other people have beautiful things without our wanting those things. The law has become a crystal clear mirror to us of how bad we really are. His summary: "in order that sin might be recognized as sin, [sin] produced death in me through what was good [- the law - ], so that through [the law], sin might become utterly sinful" (7.13).
So Paul differentiates sin and law. The law is perfect, holy, good, righteous. Sin is utterly grotesque, evil, ruthless. From 14 onwards, he describes what kind of master sin is, trying to make clear that it (sin) is not the law. In 7.16, If I realize that I am a slave to sin, I realize that the law is perfect. It has shown me how bad I really am. It has done its job. Every sentence from 15 through 20 is about how when sin is master over us, we are incapable of doing anything good. Before the law, I was a slave. With the coming of the law, I see both how beautiful the law is and how much of a slave I have been to it; how unachievable is obedience to the law.
Keep in mind, he has done nothing to either nullify what he has said in 6.18: "You have been set free from sin and have become slaves to righteousness" or in 6.22: "But now that you have been set free from sin...." He has just set apart law from sin after he has told us that we have died to both (in 6.2 and 7.4).
Any solace we take in 7.15 - 20, that this is our experience as Christians may comfort us. But it is a false comfort. You and I, as Christians, may struggle with sin, but describing that struggle (as Christians) was never Paul's intention. In looking for comfort in our habitual sin, Paul will only point us back to 6 and forward to 8. "You, however, are controlled not by the sinful nature but by the Spirit..." (8.9) and "therefore, brothers, we have an obligation - but it is not to the sinful nature, to live according to it. For if you live according to the sinful nature, you will die; but if by the Spirit you put to death the misdeeds of the body, you will live..." (8.12-13).
Living in the freedom from sin's slavery is Paul's point in 5.20 through 8.17. For the Christian struggling with sin, meditating on 8.12 - 16 and on 8.29 " will go a thousand miles farther in our discipleship than contemplating the "inner cesspool" as Lewis puts it (Letters to Malcom, 98).