There are several parts in your question.
Does pain trigger epileptic seizure?
To answer this question, it is essential to understand what is an epilepsy. An epilepsy arises when the normal pattern of neuronal activity is disturbed (ie the epileptogenic threshold is altered). This involves different cellular and molecular alterations: change in neuronal connections (lesions in the neuronal pathways), neuronal signalling (alteration in neurotransmitter availability or in neurotransmitter receptors), etc...
In the literature, some describe internal factors (such as hormones, electrolytes, state of consciousness and body temperature) and external factors (sensory or electrical) that may reduce the epileptogenic threshold and hence trigger a seizure.
One study, including more than 400 patients which were asked to describe the triggering factors of their last seizures, identified missing medication (40.9%), emotional stress (31.3%), sleep deprivation (19.7%), fatigue (15.3%), missing meals (9.1%), fever (6.4%), and smoking (6.4%) as the most common triggering factors. However, pain was also reported as a possible triggering factors, altough less common compared to the above mentionned factors. Considering that pain is associated with different molecular (neurotransmitter concentration alteration) and cellular alterations in the brain, it is understandable that pain can be a trigger for seizure.
Now to your second question
I would not like to question if doctor on neurology ward was right
that it was not epileptic seizure (I have not reason to don't believe
Loss of consciousness is not always due to a seizure. You could also have experienced a vasovagal syncope in response to the ongoing procedure (and the pain associated with it). Indeed, syncope is defined as a transient and self-terminating loss of consciousness (LOC) with rapid onset, short duration combined with spontaneous, prompt and complete recovery. Pain is a known triggering factor for vasovagal syncope (a subtype of reflex syncope). The fact that your EEG did not show any evidence for an epileptic seizure (and your CT did not find any structural anomaly which would trigger a seizure) further suggests a possible vasovagal syncope. Of course, this comment is only based on the description you provided and should not be taken for a "final diagnosis".
Epilepsy. Pubmed Health Library. https://www.ncbi.nlm.nih.gov/pubmedhealth/PMHT0023036/
Reflex Seizures and Reflex Epilepsies. Chapter 13. The Epilepsies: Seizures, Syndromes and Management. Panayiotopoulos CP.
Oxfordshire (UK): Bladon Medical Publishing; 2005.
Balamurugan E et al. Perceived trigger factors of seizures in persons with epilepsy. Seizure. Volume 22, Issue 9, November 2013, Pages 743–747
Aydin MA et al. Management and therapy of vasovagal syncope: A review. World Journal of Cardiology. 2010;2(10):308-315. doi:10.4330/wjc.v2.i10.308.