Just be aware of using teatree, it's powerful stuff so research any risks. I wouldn't think it would have the right compounds that you'd want on a pile either (?)
I was very unlucky and got a pile before I got pregnant, never had 1 before and no history in my family. I rode a racing bike with a totally unsuitable saddle and it rubbed me raw. (external)
I was using Anusol for it but stopped when I found out I was pregnant. TBH it didn't do anything at all and the only reason I got it was I was looking for a quick fix as was travelling. What worked the best was freezing witch hazel into icecubes and holding that on at night.
Basically freeze as an ice cube, cut a small piece of flanel to wrap it in, wet the flannel first so the cube sticks. Place on the pile and let it melt. I was sleeping with the witch hazel damp flannel on it.
I went for a drs apt as I wanted to get it sorted before my preg progressed but was told if you are preg theres nothing they can prescribe with certainty it's safe.
I asked about witch hazel and the Dr couldn't advise me if it was safe and refered me to a pharmacist.
The pharmacist was very unhelpful and said, "Before asking if it was safe I'd first be asking if theres any benefit in using it and I would say theres not."
With respect for his opinion, which I'm sure plenty here will share, experientially for me witch hazel was powerful and working well regardless of what he believes. I did chose to stop using that too because I couldn't find evidence it was safe to use in the 1st trimester.