Sometimes birds will preform what's known as "anting" where they either place ants or allow ants to crawl onto their body. Presumably this is done so the ants will attack parasites the bird might have and or store for later eating. Here are some videos.
Not all ants produce formic acid though.