Yes, although it will change the overall texture of the cake. Grated apples will release more moisture into the cake batter so you might need to slightly increase the flour quantity to balance it out.