Does cocaine effect you erection?

Yes! it does

There may be 2 reasons that cocaine itself causes erectile dysfunction. One reason is that cocaine is a vasoconstrictor, meaning that it causes blood vessels to constrict, and blood vessels in the penis need to be dilated in order for an erection to occur. A second reason is that cocaine interferes with the body's production of enzymes that are needed for an erection to occur, namely nitric oxide, and nitric oxide synthase, and myeloperoxidase; this effect has been studied and observed in rat models. Finally, as you already stated, it is also very possible that substances mixed into the cocaine may also be causing the erectile dysfunction.