Pregnancy is possible whenever semen enters the vagina. If semen accidentally got into the vagina during anal sex, then yes, there would be a risk for pregnancy. Or, if some of the ejaculate leaked from the anus to the vaginal opening, you could be at risk of pregnancy.
Bu the only way to know for sure if you’re pregnant is to take a pregnancy test 14 days after the unprotected sex. At that time, you will get an accurate result. (And consider visiting Teen Clinic to start a reliable birth control method soon!) However, know that semen coming in contact with the anus does not cause pregnancy.
While unprotected anal sex is considered low-risk for pregnancy, it is high-risk for contracting sexually transmitted infections. This is because the lining of the anus is very fragile and can tear during sexual activity. Small tears (known as anal fissures) may occur during intercourse. Fissures can be fairly painful and slow to heal, and provide a direct route into the bloodstream. Most anal fissures won’t cause permanent damage to the rectum, however.
In the future, Teen Clinic recommends using condoms 100%—this can help set your mind at ease. There are also ways to decrease the risks of discomfort or tearing during anal sex—check out this question to learn more.