Erections aren't binary, they have a gradient of turgidity; but going by your statement "completely impossible," then I will assume that for your novel you want to understand what would prevent any noticeable degree of erection.
As it is a part of the body, the penis will continue to be perfused by the circulatory system as long as the heart is pumping.* The blood trapping that occurs during erection is a mechanical obstruction of the outflow of blood in response to arousal.
There IS redistribution that occurs when the body experiences significant blood loss, and there is certainly a point prior to death at which there would be decreased penile perfusion, but there is no clear way to pinpoint a specific point at which no amount of arousal would result in ANY erection whatsoever.
That said, the psychology of whatever traumatic injury is causing the blood loss, coupled with the intense physiologic sympathetic stress of the compensatory mechanisms, may impact the ability for the individual to experience arousal.
- The cardiovascular physiology of blood loss is actually really complicated. As you imagine, the body wants to do absolutely anything it can to keep functioning, so there are a lot of mechanisms that kick in the more blood volume that is lost. The physiologic response also differs between acute blood loss and chronic blood loss.
Of course there is an amount of blood that would result in immediate death, which in a normal healthy person would likely be at least 40% blood volume or greater. But the points leading up to that are where things are more complicated.
This website will help illuminate the complexity. A few key passages:
When blood loss is 15 to 40%, mean arterial and pulse pressures fall,
and heart rate increases, with the magnitude of these changes being
related to how much blood is lost. If the hemorrhage is stopped, the
arterial pressure slowly recovers and heart rate declines as long-term
compensatory mechanisms are activated to restore normal arterial
pressure... A greater than 40% blood loss is life threatening, and
resuscitation is generally essential for survival because prolonged,
severe hypotension leads to organ failure and death.
Compensatory mechanisms. The reduction in blood volume during acute
blood loss causes a fall in central venous pressure and cardiac
filling. This leads to reduced cardiac output and arterial pressure.
The body has a number of compensatory mechanisms that become activated
in an attempt to restore arterial pressure and blood volume back to
normal. These mechanisms include:
- Baroreceptor reflexes
- Chemoreceptor reflexes
- Circulating vasoconstrictors
- Renal reabsorption of sodium and water
- Activation of thirst mechanisms
- Reabsorption of tissue fluids
There are also exceptional cases where people have survived massive blood loss, or died from lower amount of blood loss - so it's not always the exact same case. But this at least gives some direction.
As for drugs, with hypovolemic shock, we try to rapidly expand intravascular volume crystalloid fluids (like normal saline or lactated ringer's) and blood when available, and sometimes use vasopressors like norepinephrine to maintain an adequate mean arterial pressure. The medication is a short-lived solution until the blood can be replaced, however.