First of all, one need to know that there are many types of arrythmias. Stress-induced arrythmias are quite common, even in normal individuals. However, before confirming that the arrythmia is purely stress-induced, the physician needs to rule out other organic cardiac diseases, e.g congenital heart disease, valvular heart disease, cardiomyopathy, coronary heart disease...and the list goes on. This is so because patients with conduction abnormalities normally demonstrate evidence of cardiac disease as the cause of the conduction abnormalities.
Severe stress, caffeine, and alcohol, alone or in combination are known to cause arrythmias. In the absence of organic heart disease, removal of this stimuli abolishes the arrythmia. So, if you are on medication to regulate your heartbeat, diving is permitted.
However, treatment for the arrythmia can produce more troublesome symptoms (side-effects) than the arrythmia itself, so the physician needs to weigh the pros and cons before one is allowed to dive.
To be safe, anyone with a cardiac disease or abnormalities should do a dive medical check-up before he dives so that further evaluation can be done. "Better be safe than sorry."