It is allowed to use trademarks in keywords (in Google Ads). Google Ads does not restrict the usage of trademarks, in keywords.
About usage of trademarks in ad copy (ad headlines, ad descriptions) : It is in a case to case basis. Example : Certain trademark owners, contact Google Ads with a request to restrict the usage of their trademark in Google Ads ad copies (ad headlines, ad descriptions) and in such cases, on a case to case basis, by default, Google Ads may restrict the usage of such trademarks.
So, in your case of running an ad using a brand name (of that competitor) in the ad headlines (ad descriptions), you can really not know if it is doable, other than by trying (trial & error). Because, there is no way to know if the food brand has requested Google Ads to restrict the usage of their trademarked brand name in Google Ads ad copies (ad headlines, ad descriptions).