All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If a person is in a state of sexual defilement, either due to sexual intercourse or a wet dream, he must perform Ghusl (ritual bath) and it is not permissible for him to perform the prayer beforehand.
The sufficient Ghusl is achieved by pouring water all over the entire body. If a person has poured water all over his entire body, including the place you asked about (the private parts), then he has removed the state of ritual impurity and he is no longer in a state of sexual defilement, and it becomes permissible for him to perform the prayer.
Washing the private parts before performing ablution (when performing Ghusl) is not a condition for the validity of Ghusl; rather, this is just a recommended act.
Allah knows best.