From the Merriam-Webster dictionary
I saw her at the doctor's last week.
How long will you be at the doctor?
Considering the fact that both of them come from the Merriam-Webster dictionary, it seems sure that both "the doctor" and "the doctor's" are grammatically correct.
However, the Cambridge Dictionary just lists the former. Does that means the latter is not as popular nowadays?