If you’re willing to flush however many years of law school down the drain, then yes, you probably can withdraw and be disbarred for it (and then the defendant gets a mistrial and a new lawyer, and the victim has to go through the drama of the trial all over again).
I’m pretty sure, if not on Day 1 then certainly in the first semester of Criminal Law, that the instructors will say, “Look. Your job is not to determine who is guilty and who is innocent; it’s to represent your client’s interests to the best of your ability. Even the guilty deserve the best possible defense, and the benefit of every technicality. If you can’t deal with that, there’s the door.”
You shouldn’t be deciding, after you pass the bar, that you’re unwilling to stand up and fight for the most loathsome people on the planet, because that’s what you’re sworn to do. That’s what the system of laws is there for: the defense has to make the prosecution prove every element of the crime, each beyond a reasonable doubt. To do otherwise is to risk sending (more) innocent people to jail.
There’s a distinction here between ethics and morals: ethics being what is expected behaviour from a professional, and morals being what is expected of, as you call it, a “good person.” 99% of the time, your ethics will, if not agree with, then at least not contradict, your moral beliefs. But here’s a case where it’s not so clear, and then you have to make the decision: do I do the right thing as a lawyer, or do I do the right thing as a good person?
If you choose the latter, then you shouldn’t be in that profession. And maybe that means that the members of that profession aren’t “good people.” But when that job is essential to the correct functioning of the rule of law, then you have to have someone doing that job.
Personally, I think that professionals (doctors, lawyers, police, et al.), should put their morality into a little black box every day when they put their uniform, and act according to the ethics of their profession. If you’re a doctor who thinks abortion is always a sin, you should still be willing to put that aside and save a woman’s life. If you’re a policeman who thinks that #BLM is a bunch of thugs, you should be able to put your uniform on, march down the street to ensure that the protesters are protected, and then go home satisfied that you did your job to the best of your ability.
So, yes, a defense attorney should do everything in her power to discredit a witness, if that’s the best representation that the lawyer can provide under the law. That’s her job, and she should have known that this was her job well before she took an oath to do it.
And if you have an alternative that doesn’t mean that more innocent people are going to be wrongly convicted because the victim can’t be effectively cross-examined by the defense, I’d like to hear it.