Perhaps not, but I think you can announce that you are "withdrawing" from a treaty, and then do so. But you would have to make the decision that it was worth it to do so. In this case I would not do so without careful consideration. Notifying a consulate isn't such a pain as to warrant withdrawel. An "order" to stop an execution might be.
We would certainly like for our embassy to be notified if we were arrested for murder in Mexico, though I don't believe it actually happens. It usually falls to the arrestee himself to get word out. And of course, our embassy is of no help whatever. I think they will pass your name to a local lawyer, if you don't have one. If you have no money to pay him, too bad for you. But otherwise you are on your own, unless your case takes on any higher political significance. Someone arrested for espionage in Russia gets their attention, but someone arrested for a crime in Mexico does not. This is a misconception many people have when they travel overseas, that the embassy will help you if you're in trouble. They frankly have bigger fish to fry, and they don't want your trouble.
No, a public defender might not be aware that he should notify the consulate, the arrestee himself might not think of it, likewise the prosecutor may not have either in the past. No one ever made an issue of it until recently. I find it difficult to believe it would have made any difference in the outcome of the trial.
But if its an issue, then we should direct our prosecutors to ascertain the citizenship of the arrestee, and notify the relevant embassy in the future. But I wouldn't retry anyone already convicted. There is a pretty rigorous appeal process before these guys go to the chair, anyway. And Mexico's treatment of US prisoners is nothing to brag about, and they resist criticism on the basis that their justice system is sovereign.