Yes, it is possible and has been observed
There is a well cited Wikipedia page on the phenomenon (Death Erection)
The phenomenon has been attributed to pressure on the cerebellum created by the noose.(1) Spinal cord injuries are known to be associated with priapism.(2) Injuries to the cerebellum or spinal cord are often associated with priapism in living patients.(3)
Death by hanging, whether an execution or a suicide, has been observed to affect the genitals of both men and women. In women, the labia and clitoris will become engorged and there may be a discharge of blood from the vagina. In men, "a more or less complete state of erection of the penis, with discharge of urine, mucus or prostatic fluid is a frequent occurrence ... present in one case in three." Other causes of death may also result in these effects, including fatal gunshot wounds to the brain, damage to major blood vessels, and violent death by poisoning. A postmortem priapism is an indicator that death was likely swift and violent.(4)
There is even a published peer reviewed paper on the topic of priapism in acute spinal cord injury.(5) (Note: SCI stands for spinal cord injury).
Priapism that follows acute traumatic SCI is high-flow (non-ischaemic) priapism, that is, the blood within the corpus is arterial in nature. Priapism does not occur in all patients with acute SCI. The literature does not allow us to determine in what proportion of patients priapism occurs. Priapism has been reported following a wide variety of spinal cord pathologies including acute SCI, transverse myelitis and postoperative extradural haematoma. In all patients, priapism is associated with complete motor and sensory (American Spinal Injury Association A) paraplegia. Priapism has been reported following spinal shock. Following traumatic SCI, priapism usually settles rapidly without specific treatment being required. Priapism occurs at the moment of complete motor and sensory paraplegia, it does not occur following a delay. There are medicolegal implications: the presence/absence of priapism assists in determining when the complete spinal cord lesion occurred.
(1) George M. Gould and Walter L. Pyle (1900). Anomalies and Curiosities of Medicine. Retrieved 2007-01-26.
(2) David Levy, DO. "Neck trauma". eMedicine.com. Retrieved 2007-01-26.
(3) Willis Webster Grube (1897). A Compendium of practical medicine for the use of students and practitioners of medicine. Hadley Co.. Retrieved 2007-01-26.
(4) William Augustus Guy (1861). Principles of Forensic Medicine. London: Henry Renshaw. Retrieved 2007-01-26
(5) Todd, N V. Priapism in Acute Spinal Cord Injury. Spinal Cord 49.10 (2011): 1033-1035.