The right to counsel is enshrined in the the federal & state constitutions; thus, no competent judge would tell you that you cannot have a new lawyer. If an attorney withdraws under such circumstances, you would have every right to request a continuance, which would be granted.
Its true that a new lawyer needs time to get up to speed. You not only have a right to counsel but also have the right to "effective assistance of counsel". There is no way that a judge would risk reversal on appeal.
Talk to Lawyer