There are some STDs which have rectal discharge as a symptom. Symptoms are usually not present in about 90% of cases. When present, symptoms include anal or rectal itching, discharge, and pain during defecation.
Do you experience pain when defecating?
There are also many other causes of rectal discharge. Tests may be needed, therefore you should see your doctor.
You may find this website helpful:
rectal discharge