It’s possible that it could be gonorrhea as it is common for this to cause discharge from the penis and pain when urinating.
There are also other STI that can cause similar symptoms as well for example chlamydia.
I would recommend going to a clinic to have it looked at. They will do some testing for you as well as probably offer you some treatment given the symptoms you are experiencing, let us know if you need help finding a clinic in your area.
It’s also likely that the person who passed this to you is experiencing no symptoms for example, it’s common for gonorrhea to show no symptoms when it is in the throat, rectum or vagina. Given this we always recommend if someone tests positive for a STI like gonorrhea or chlamydia that they inform past sexual partners they have had over the last 2 months.
Let us know if this does not answer your question or if you have any further questions or concerns.