Yes, depends on drug
Stimulants or "uppers" are especially likely to do this. For example, Cocaine
has been known to precipitate heart attacks by causing spasm and constriction of the arteries and increasing heart rate
. Amphetamines are thought to contribute to heart attacks through a similar mechanism.
Answer assisted by Brittany Chan, Medical Student