hard, like diamond or steel, but also hard cheese
firm, like a muscular arm, you can push your finger into the surface but not far, so it has to be yielding
Apple, a firm apple would be nice to eat, a hard one would not be ripe.
You could say both but they would mean different things. Firm has a more positive connotation(feeling). Hard is neutral or negative depending on the context.
In this case, a firm apple means it is hard in a pleasant way. Not too hard. Nice and crispy. Good for baking apple pie :)
A hard apple would be hard in a neutral or negative way. Perhaps too hard. It doesn't sound weird but it doesn't sound completely natural to an English speaker because we would more likely say it with a modifier.
ie. The apple is too hard. The rock-hard apple...
Hi Ishimori! Both "hard apple" and "firm apple" sound fine to me. Depending on your exact meaning, "crunchy apple" or "crisp apple" could be even better.