Which is correct:

I have a doctor appointment this afternoon.
I have a doctor's appointment this afternoon.

My preference is "doctor appointment," and my reasoning is because no one ever says, "I have a dentist's appointment." And yet, I hear most people use the latter.
It's "doctor's appointment".

I like your reasoning, but in fact "dentist's appointment" is also correct. Moreover, it isn't entirely true that no-one ever says it. "Dentist's appointment" is said in England, for example. Your reasoning could be correct in your part of the world, of course.

Another way to say this is
"an appointment at the doctor's (surgery)"
perhaps this is why we say a "doctor's appointment" - doctor's [surgery] appointment.

Note; we say "an appointment AT the doctor's" and "an appointment WITH the doctor"

P.S. Dentists are a little more easily dealt with - we can say a 'dental appointment'Emotion: big smile

Coming soon to the dentist's (surgery) near you - Nitrous Oxide - The ONLY way to fly!!
Students: We have free audio pronunciation exercises.
Thanks, Rommie, for the reply; but I'm still confused. The apostrophe makes it possessive. Whose appointment is it: mine or the doctor's? I must be missing something.
im kind of confuse as well
Site Hint: Check out our list of pronunciation videos.
 Mike in Japan's reply was promoted to an answer.