Do you count tattoos?
Under the skin !? Dam that would hurt!
Yes as long as blood supply to the skin on top of the object was mostly uninterupted otherwise you’d get necrotic lesions.
Edit: but why would they need a vasectomy?
I recall some folk in the transhumanism community have done things like implant magnets and the like, I think they coated them in medical silicone. And of course you have medical devices like cochlear implants and pacemakers, prosthetic joints and the like.
The material is as important as the sterilisation. Some stuff, like titanium are biocompatible and generally won’t cause issues. Things like lead are probably best avoided and I think steel is largely avoided these days as well. Fabrics and porous materials are just asking for trouble.