Thank you for your query.
Just a per vaginal examination cannot cause such severe pain
However, you have not mentioned what form of high risk pregnancy
you are having.
If you are having any risk factor of preterm labour , then you should visit the ER for an assessment, as pain and discharge could herald the onset of preterm labour pains.
Also, it could be a mild gastritis
and incidental discharge.
Since you cannot be sure, it is better to have a check up, as you mentioned that you are quite high risk.