I am adding this here as additional background both on Gyges and for Cicero's commentary on hypotheticals. Its from On Duties Book 3:
LacusCurtius • Cicero — De Officiis III.35‑95
37 Away, then, with questioners of this sort (for their whole tribe is wicked and ungodly), who stop to consider whether to pursue the course which they see is morally right or to stain their hands with what they know is crime. For there is guilt in their very deliberation, even though they never reach the performance of the deed itself. Those actions, therefore, should not be considered at all, the mere consideration of which is itself morally wrong. Furthermore, in any such consideration we must banish any vain hope and thought that our action may be covered up and kept secret. For if we have only made some real progress in the study of philosophy, we ought to be quite convinced that, even though we may escape the eyes of gods and men, we must still do nothing that savours of greed or of injustice, of lust or of intemperance.
9 38 By way of illustrating this truth Plato introduces the familiar story of Gyges: Once upon a time the earth opened in consequence of heavy rains; Gyges went down into the chasm and saw, so the story goes, a horse of bronze; in its side was a door. On opening this door he saw the body of a dead man of enormous size with a gold ring upon his finger. He removed this and put it on his own hand and then repaired to an assembly of the shepherds, for he was a shepherd of the king. As often as he turned the bezel of the ring inwards toward the palm of his hand, he became invisible to everyone, while he himself saw everything; but as often as he turned p307 it back to its proper position, he became visible again. And so, with the advantage which the ring gave him, he debauched the queen, and with her assistance he murdered his royal master and removed all those who he thought stood in his way, without anyone's being able to detect him in his crimes. Thus, by virtue of the ring, he shortly rose to be king of Lydia.
Now, suppose a wise man had just such a ring, he would not imagine that he was free to do wrongly any more than if he did not have it; for good men aim to secure not secrecy but the right.
39 And yet on this point certain philosophers, who are not at all vicious but who are not very discerning, declare that the story related by Plato is fictitious and imaginary. As if he affirmed that it was actually true or even possible! But the force of the illustration of the ring is this: if nobody were to know or even to suspect the truth, when you do anything to gain riches or power or sovereignty or sensual gratification — if your act should be hidden for ever from the knowledge of gods and men, would you do it? The condition, they say, is impossible. Of course it is. But my question is, if that were possible which they declare to be impossible, what, pray, would one do? They press their point with right boorish obstinacy, they assert that it is impossible and insist upon it; they refuse to see the meaning of my words, "if possible." For when we ask what they would do, if they could escape detection, we are not asking whether they can escape detection; but we put them as it were upon the rack: should they answer that, if impunity were assured, they would do what was most to their selfish interest, p309 that would be a confession that they are criminally minded; should they say that they would not do so they would be granting that all things in and of themselves immoral should be avoided.
But let us now return to our theme.