The Donkey Sanctuary confirms that donkeys can eat apples. Apples are actually very popular with donkeys, but an apple should be given as a treat rather than as a staple item of a donkey's diet.
The Donkey Sanctuary believes the best diet for donkeys is barley straw combined with restricted grass grazing. Barley straw should be made constantly available to donkeys, as they like to eat small amounts of food frequently throughout the day. In the winter months, hay is supplemented in measured amounts as needed to offset the lack of grazing. One or two fruits or vegetables a day, including apples, stimulate the appetite and add variety to the diet.