Is Socrates correct in holding such a rigid position ("Never return a wrong with a wrong") when it come to following the law? Are there time when breaking the law is morally permissible? I'm stuck in between agreeing with Socrates and also opposed to his idea of "never return a wrong with a wrong" because I think it really is dependent on the situation, if it is a circumstance of life or death, and if there is no other option—in which case I think breaking the law is morally permissible.
This is a difficult question, and you are right that there is not an easy answer. As your quote alludes, Socrates believed one should never return a wrong with a wrong. In other words, he opposed the concept of revenge which governed justice in the ancient world. Vengeful justice can be found in numerous ancient works, including the Code of Hammurabi and the Oresteia. But, as Aeschylus intimated in his work, "blood for blood" or "eye for eye" justice does not bring peace to society; it only creates an unending cycle of violence. Lasting peace can only exist when someone decides to stop the cycle. As Mahatma Ghandi said, "An eye for an eye only ends up making the whole world blind."