All of these are possible, depending on how you want to emphasize John's lack of the thing.
You are correct that whether you use the singular or plural depends on what is common and logical. If people routinely have more than one of a thing, use the plural to say they don't have any.
John doesn't have any children.
John doesn't have any apples.
If it's common and routine for someone to have one of a thing, use the singular:
John doesn't have a house.
John doesn't have a car.
However, this depends on the context. If you want to really emphasize the lack of something, use the singular (usually along with a qualifier like even):
John doesn't even have an apple. (He should, but he doesn't)
John doesn't have a single television. (He says he hates TV.)
You can also match the singular/plural of a specific question:
A: I'm looking for a guy with an apple. Do you see him?
B: John doesn't have an apple (so it can't be him).
A: Does John have a pen I can borrow?
B: No, John doesn't have a pen. (He already asked if he could borrow mine)
Most of the time it's OK to respond with whatever is customary, though. Either way is fine:
A: Is that John's son over there?
B: No, John doesn't have any sons (or "John doesn't have a son")
Side note: In all these examples I use the "doesn't have any X" structure. This is, I think, more common and customary than the "has no X" structure, which is used more to emphasize the lack of something. For example if I say:
John doesn't have any food.
this implies that John may be temporarily without food. However:
John has no food.
implies that this is a typical situation, emphasizing his lack of something most people do have. Again, this depends on context. These would be closer in meaning and intention:
John doesn't have any food in his house.
John has no food in his house.
It's a serious situation to be without food at all, but saying there is no food in his house could simply imply that John normally eats out.
Again, "no food" is slightly stronger, implying an expectation that John should have food. Suppose John's mother stops by and checks his kitchen, and wants to scold him for not buying groceries:
John! Why do you have no food in your house!
This is a slightly stronger rebuke than, "Why don't you have any food in your house?"
A: (Going into a grocery) Hi, do you have any apples?
B: We have no apples. Try the shop down the street.
B: We don't have any apples. Try the shop down the street.
If someone working in a grocery store told me "We have no apples", that would seem strange and a little rude, and make me feel that, for some reason, they actually object to apples.
Of course, this can be modified by context, such as by adding a courtesy or a qualifier:
B: Sorry, we have no apples today. Try the shop down the street?