"I don't have an apple" vs. "I don't have apples"?
I have seen both. I tried to think about the count. When it comes to "nothing", it indicates a number of 0, which in English should be expressed by plural. However, both forms are common.
Which form should I use? Are(is) there any difference(s)?
A similar question is linked here: Should I use "What is the difference..." or "What are the differences..." if I don't know how many difference(s) there is/are?
Saying "I don't have any apples" refers to the category of apples as perhaps a fruit or a product. Saying "I don't have an apple" means I do not have a single example of one. Each is used in a particular context where the meaning will be clear.
Looking at my store shelves I would refer to apples as the category in general. Looking into my lunch box I would refer to an individual item. Each could be used in either case without being inaccurate but this can create the confusion you are expressing. Just as if you might look at a dozen apples you could say "I don't have An apple."