I think it will be fine as long as the concentration is not really high.
"Manure and bedding from 60 horses at Oxley Equestrian Facility, Cornell University, Ithaca, NY de-wormed with 114 mg ivermectin paste each, was collected over a 3-day period in 2011 for composting. The presence of ivermectin did not appear to affect the composting process as shown by thermophilic temperatures and proper mass loss. There was a severe drop in ivermectin concentration in the manure/bedding mixture within the first few days of composting indicating exponential decay. "
