Yeah, it's a weird question, but let me explain:
I was studying about the tyranny of Peisistratos in ancient Athens and it's relations with the cult of Dionysus when I suddenly read a text about his "unnatural relations with his wife", according to Herodotus (Histories, I, LXI).
Since, according to Herodotus, the alcmeonidae were cursed, Peisistratos didn't want to have kids with his wife, having only "unnatural relations" with his wife, which I conclude to be anal sex.
This got me curious. Besides Herodotus, what are the other ancient texts that cite anal sex?
Tablet 104 of the Babylonian Summa Alu, a divination text, wrote that "If a man copulates with his equal from the rear, he becomes the leader among his peers and brothers." but also gives prophecies for sex with other statuses, e.g. "If a man copulates with a house-born slave, a hard destiny will befall him."
So it would appear that from their perspective, the act itself was not as significant as the social rank of who you did it with.
I'm curious as to how early you mean? There's plenty of pornography from 1500 and later, but I do not know about Greek or roman texts, except the obvious ones (Catullus, etc).