First of all, the statement ‘no one does wrong knowingly’ does not entail, and is not entailed by, ‘no action on anyone’s part is justified.’ Not all actions are wrong, and not all ignorance-based actions are insane.
Second, you have identified an assertion (namely, ‘no one does wrong knowingly’), but did not provide an argument for it.
In any case, there is a certain truth in the contention that, whenever people act, they believe themselves to be acting rightly. And it does seem to follow that, when people act wrongly, they are acting from ignorance.
And that—-or some variant thereof—is Socrates’ argument for his claim.
Here is the fallacy in that argument.
When we speak of ‘right’ and ‘wrong’ action, there is always an implicit benchmark. If I am hungry, and I steal food to eat, I am acting ‘rightly’ in that I am upholding one set of interests (namely, my own), even if, by stealing, I am violating some other person’s interests.
In some cases, an act serves nobody’s interests, even those of the agent, and is therefore immoral relative to every possible benchmark; and such an act must indeed be ignorance-driven.
So the fallacy in Socrates’ argument is to believe that there is some single standard of right and wrong with respect to which actions can be evaluated, when, in actuality, an act can be wrong relative to a given set of commitments and right relative to some other set of commitments. (Relative to my responsibility to feed my family, I am right to embezzle; but relative to my responsibilities to my employer, I am wrong to do so.)