Well without them I fear an erection would be the least of my problems.
As far as medicines go, erectile dysfunction drugs like sildenafil, vardenafil and tadalafil are very safe. You're unlikely to have a problem if you are on any other medication.
The main cardiovascular risk is the physical exertion to your body caused by sexual activity rather than interference with your heart medication. If you are at risk of having a heart attack all that vigorous pumping might bring one on! On the other hand, sildenafil is actually used to treat a particular form of hypertension so it might do you good.
The biggest real side effect of sildenafil is in the eyes, it can cause blurring, colour distortion or seeing spots. If that happens, switch to one of the other drugs. Another issue can be increased blood flow throughout the body and not just the penis, leading to flushing and headaches for example.