There is the potential for cosmetic tattoos and piercings to do harm. Tattoos can get infected, they can hurt, and an animal would need to be sedated to receive one and that is not risk free. There is also a bunch of care that needs to be taken with a new tattoo to take care of it, which is difficult to do in a species that likes to lick itself. Piercings can also get infected, animals like to lick and chew things implanted in their skin, and there is the potential for them to be caught and ripped.
Cosmetic tattoos and piercings offer no benefit to the animal.
Humans can consent to these things, and they could argue that they have a benefit for some humans.
So no, I don’t think it’s ethical or okay in any way to give piercings or cosmetic tattoos to animals. Even if it’s a vet doing it, and I think vets should refuse to allow it.
We put a desexing tattoo on small animals at the time of surgery to prevent them being opened up again to look for gonads that aren’t there if they end up as a stray somewhere. Some livestock have ear tags for identification, but that’s only because intra-muscular implants are not recommended in an animal someone intends to eat.
You also have to consider that the best-case scenario is the modification only causing a small amount of discomfort. Tattoos hurt, especially when they cover a large area of skin. Plus, tattooing or otherwise modifying an animal for aesthetics only furthers the idea that the animal exists purely as an object to be admired, rather than a living being.
Animals do not exist to be decorative. If you want to have an attractive animal (dart frog, fish, etc) as a purely decorative pet, that’s fine as long as you care for it properly, but it is not acceptable to cause an animal pain for no other reason than because you want to change its appearance.