I damaged my ulnar nerve. Will I be able to play the violin again?

Complex question. The answer is in the details of the severity of injury and treatment, site of injury, health and age of the patient. Talk to your doctor!
Will be difficult. The ulnar nerve is very important to hand and finger function and controls some of the finer muscles as well as sensation in the ring and small fingers.