The anus is not attached to the uterus which is where ovaries are attached and where an egg would be. No way that this could happen--- pregnancy happens when a penis is in a vagina. Anal sex can't lead to pregnancy.
Your friend can start by reading up about the human anatomy and reproduction in humans here:
https://en.wikipedia.org/wiki/Human_reproduction
A pregnancy is possible ONLY if semen is ejaculated or deposited into the vagina. The vagina IS NOT connected to the anus in any way, and serve completely different functions which I assume you know.
Please educate yourselves fully and empower yourselves with knowledge about reproduction, birth control etc., before having sex so that you do not catch STDs (sexually transmitted diseases) or get into an unwanted pregnancy.
Wish you all the best!