The latch on our metal gate rusted and snapped off. I'm having trouble finding a latch similar to this one that bolts onto itself rather than being screwed/bolted into the gate. Since I cannot find a replacement latch, can I drill new holes into this gate to attach a different type of hardware, and if so, how should I do this?
Can you drill holes through the bars to install a different kind of latch? With the appropriate tools, absolutely.
Should you drill holes through the gate to install a different kind of latch? Well, that might be up for debate.
If you choose to do so, you're opening up the metal of the gate posts to the same rust that attacked the latch itself. Only this time, instead of being on a replaceable part, it's a part of the gate itself.
If you choose to drill, you will very definitely want to apply some serious rust protection (a good quality spray paint, applied well and in multiple coats would be a great start) to the hole. If I were to do so, I'd drill a clearance hole (big enough for the new bolt to pass through w/o touching), paint it thoroughly, then attach new hardware with a through bolt & nut on the other side. I might also consider a layer of silicone caulk between all mating surfaces in an attempt to keep water out.
Will you compromise the overall integrity of the gate by drilling one or two holes for mounting a new latch? Not unless the holes are too big.
Could you possibly compromise the long-term integrity of the gate due to rust? Possibly, but you can protect against that.