The question - can God create a rock too heavy for him to lift? - is ambiguous. That is, it admits of two quite different interpretations ('de re' and 'de dicto'). The answer is 'yes' to both. But they are different questions, expressed with the same words.
An example to illustrate - can a bachelor marry? That question is ambiguous in the same way.
It could mean 'does the person who qualifies as a bachelor have the ability to marry?' To which the answer would be yes. It's not as if being a bachelor somehow prevents one marrying. A bachelor who met the woman of his dreams would be manifesting confusion if he said to her upon her proposing marriage 'I'd love to marry you, but I am a bachelor and so can't'
Likewise, 'can an omnipotent being create a stone too heavy for her to lift?' can be interpreted as 'does the person who qualifies as omnipotent have the ability to divest themselves of their omnipotence by creating a rock too heavy for them to lift - in other words, do they have the ability to go from being able to do anything to not being able to do something?' The answer to that is 'yes', for it is confused to think that being omnipotent prevents you from doing things. 'I'd love to create a rock too heavy for me to lift, but I can't because I'm omnipotent' is confused.
Then there's a different question that the same words can be used to express. And that is, can a bachelor, 'as a bachelor' - so qua bachelor - get married? With one exception, the answer to that question is 'no'. For a married bachelor is a contradiction in terms.
So, two very different questions expressed by the same words. And the answer to one is 'yes'and the answer to the other is 'no'.
Applied to 'can God create a stone too heavy for him to lift?' The second interpretation is 'can God, 'as God' create a stone too heavy for him to lift? In other words, can God be God at the same time as there exists a stone too heavy for her to lift?'
Now one might think that the answer to this version of the question is 'no'. For the state of affairs described involves a contradiction, no less than that of a married bachelor.
And many theists - stupid ones - would indeed say that the answer is no. But the answer is 'yes', for God can do anything and thus can create contradictory states of affairs. Many think not, because they think - correctly - that the law of non contradiction forbids this, and think - incorrectly - that the law constrains God. But God is the one exception - he is, by definition, all powerful and thus is bound by nothing.
It is, ironically, those who think God cannot create contradictory states of affairs who think something that violates the law of non contradiction. For they think a being who can do anything is at the same time unable to do some things. That's a contradiction. An actual one, not a potential one.
I think the law of non contradiction is true, and thus I think that God can violate it. And thus I think God can create a stone too heavy for him to lift, and lift it.
So, can a bachelor stop being a bachelor? Yes.
Can God divest himself of his power? Yes.
Can there be a married bachelor? With the exception of God, no.
Can God be both able and unable to do something at the same time? Yes. For God is by definition able to do anything, and thus it would be an actual contradiction to deny that God can violate the law of non contradiction.
What one has to understand is that the law of non contradiction is actually true, but potentially false. Or to put it another way, it is contingently true, not necessarily true. For if God exists there are no necessary truths, and it would violate the law of non contradiction to think otherwise.