*** This is an imperfect attachment, but is the best iteration yet. No guarantees that it won't break, but fortunately the device is a locator. ***
There are a lot of OEM, third-party, and printed attachments for attaching Apple AirTags to collars or small straps. There is a very small space between the (not permanently and often easily opened) battery compartment and a separate material. This is a small layer of filament that fits between that space and then has two prongs that can use any (strong) tie-able material to attach it to another material.
It works well for me so far, even with a 10 lbs. dog.