They will ask you to give your name, but I don't know if they can refuse to treat you if you don't give it.
Is there a reason that you don't want to disclose your name? It can be helpful to them in terms of history etc, they also then notify GPs etc if there are things they need to do - like dressing changes or suture removal.