Given the text, and its context, what does "all things are lawful for me" mean? And what is the meaning of the entire verse?
Bottom line: The context here is that Paul is concerned about the state of the church of Corinth because they're spending time with a "fornicator" (KJV) that is having an incestual relationship with his mother (5:1). Verse 6:12 means exactly what you think it means. It is particularly confusing for several reasons, mainly because of the quotations and their lack of attribution.
In chapters 1-4, Paul is upset with the church at Corinth for debating amongst themselves about who they should follow -Peter, Paul, Apollo or Christ.
"What I mean is that each one of you says, "I follow Paul" or "I follow Apollo" or "I follow Cephas" or "I follow Christ." (1:12, KJV. Also 3:4-6)
This debating is causing division.
"I appeal to you... that all of you agree, and that there be no divisions among you, but that you be united in the same mind and in the same judgement." (1:10, KJV)
It's creating arrogance.
"...that you may learn by us not to go beyond what is written, that none of you may be puffed up in favor of one against the other." (4:6, KJV. Also 3:21, 4:18 5:2)
It's a "worldly wisdom" that never brought anyone to God.
"Where is the wise? Where is the scribe? ...Has not God made foolish the wisdom of this world? For since, in the wisdom of God, the world did not know God through wisdom, it pleased God through the folly of what we preach to save those who believe." (1:19-21, KJV. Also 1:25-27, 2:5-7, 3:19-20)
So Paul wants their spiritual wisdom, not their worldly wisdom.
"Let no man deceive himself. If any man among you seemeth to be wise in this world, let him become a fool that he may be wise." (3:18, KJV. Also 1:30-31, 2:5-7, 2:12, 2:16, 3:16)
The tension rises in Chapter 5, where Paul says he's heard they're affiliated with a man that is having an incestual relationship with his mother.
"It is actually reported that their is sexual immorality among you and of a kind that is not tolerated even among pagans, for a man has his father's wife." (1 Corinthians 5:1)
Paul is upset that they're not upset about it, that instead of spending their time focusing on the man's "fornication" (KJV), they're spending their time being arrogant, debating "worldly" things.
"And you are arrogant! Ought you rather not to mourn? Let him who has done this be removed from among you." (1 Corinthians 5:2, ESV)
The verse uses quotes twice. If, in the quotes, Paul is not attributing what's in the quotes to the church members, why use quotes? Then the scriptures go from five chapters and 11 verses of Paul talking to the church about the church, to him talking about himself (in quotes) all of a sudden. If the words are Paul's, the meaning is the same because Paul would be correcting them.
Two translations add, "you say," prior to the quotes, to show that Paul is reiterating what the church members say (NIV, NLT). The second set of quotes is odd, though, because their is no "you say" and there's an "I" inside and outside of the quotes.
"You say, 'I am allowed to do anything' -but not everything is good for you. And even though 'I am allowed to do anything,' I must not become a slave to anything." (NLT)
What I've written below is my over-worded, modernized translation. I wouldn't translate it this way because it isn't accurate. It doesn't follow the text and it doesn't use the symbolism of a court, which is used from 5:13 to 6:7 with "judge" and "law." But this is the essence of what I hear Paul saying:
You say you have the right to do whatever you want but everything you want isn't always good for you, so even though you have the right to do what you want, you shouldn't let the things that aren't good for you have power over you.
Your interpretation is correct.
"Paul is saying, we should never be dominated by anything in this world, no matter what it is, no matter how good it seems to be."
In context, the church needs to use this logic so they don't lose sight of what is happening now with the "fornicator" (KJV). Their arrogance and worldly wisdom blinds them to what is more important. It won't let them see that this incest is wrong and that this man needs to be shunned. Their arrogance and worldly wisdom is having power over them.