Yes.  New York State law mandates that any person charged with a crime must have a lawyer represent and defend them.  If you cannot afford a lawyer, the Court will appoint one for you.