The scientific answer is yes. It might affect your pacemaker safety, depending on the strength and location of the static electrical charge to the human body. From the Journal “Images in cardiology” “Initiation of pacemaker endless loop tachycardia by triboelectricity” (static electricity)

Static electricity or triboelectric signals may account for mysterious over-sensing by unipolar pacemakers. When the relative humidity is quite low, an observer, especially when wearing rubber shoes, may gather considerable static electricity when entering a carpeted room. Touching the patient’s skin over a unipolar pacemaker may release sufficient static voltage to be sensed by a unipolar pacemaker.”

Initiation of pacemaker endless loop tachycardia by triboelectricity
S BAROLD – Heart, 2001 – ncbi.nlm.nih.gov