In the case of horses, the best practice is not to feed moldy hay or grain, ever. Since the horse does not have the same type of digestive system as a cow, what a cow may be able to eat without problem may make a horse colic.
For cattle, the answer depends on what mold, whether mycotoxins are present, which mycotoxins are present, at what level, what percent of the animal’s diet will be moldy grain, and what type of animal and what age will be fed. Some molds are toxic, and others aren’t. The only way to determine risk is to identify the molds present and determine what mycotoxins are present at what level. With this information, feeding recommendations can be made based on the published literature.