
Can a doctor tell if you were ever pregnant?
I am unsure if this question means “pregnant” only or includes giving birth. I’ll go with number 2. (Number one would depend on how far the pregnancy had progressed. 6 weeks? 12 weeks? 20 weeks?)

If you gave an obstetrician a sleuth test on a particular woman to determine if she had been pregnant and given birth reasonably near full term, I do not think it would take him/her too long to work out the tell tale signs. Here are a few reasons.
The cervical os changes from a little round hole to a more almond shaped opening. Although the vagina usually pulls back pretty well into shape, it is unlikely to be as firm as a never-pregnant woman’s.
Changes in the perineal floor muscles may be obvious, and this will include the hymen. Those muscles just had passed through them a head size of 30–38cm or more. They do a marvellous job of returning closely to pre-pregnancy shape, especially if the mother does Kegel exercises, but they cannot resume the tautness of a never pregnant woman.
There may be evidence of an episiotomy or tear, depending on how it healed. In the unfortunate event of a second or third degree tear, the perineal muscles may not be able to contract upon command unless reconstructive surgery is undertaken. If an obstetrician were to place a finger into the vagina and say “Squeeze my finger”, in such cases a woman either cannot do so, or her muscle strength may be weak. Even a well healed episiotomy produces scar tissue which feels toughened compared to surrounding tissue. If an obstetrician places a finger into the vagina, then massages the perineal floor between the vagina and rectum, they will feel this slight ridge of scar tissue.
Stretch marks - a great many women develop some stretch marks on their abdomen, around swollen breasts, or even hips and buttocks, depending upon the amount of weight gained. In the period after birth, these will be red and VERY noticeable. They eventually become silvery in colour and much less noticeable, but they do not ever go away.
Nipples change colour with pregnancy hormones - they turn a darker shade. In a light skinned Caucasian woman, this may be from very pink to light brown. In a darker skinned woman, this may be from brown to a much darker brown. This coloration is very persistent.
Other breast changes can include more prominent nipples, especially if breast feeding occurred. Prior to birth, even a woman with large nipples may find that they flatten when warm and comfortable. After birth, they may well always protrude.
Other colour changes occur.
In many women, a “line” of darkened skin appears from the umbilical area to her pubis. The exact depth of colour depends on her own complexion, but it can be extremely dark. On her face, a “mask of pregnancy” may appear, which means areas of dark skin highlight the face like a mask. It is more common in darker skinned women. This may disappear completely, but in some women, it is noticeable to one degree or another for a long time.
A caesarean scar would be very obvious.
Now…let’s get to a real nasty. It is VERY common for pregnant women to develop haemorrhoids, either in the later stages of pregnancy, or especially during the birth itself. Tremendous pressure is placed upon the anus. Even if these “calm down” without being lanced, the tell tale shrivelled skin is obvious to a doctor.
Another nasty. Some women are predisposed genetically to develop varicose veins. If so, then pregnancy can cause prominent veins, often very large and some cases very discoloured. I have seen women whose legs appear blackish/blue from the network of affected veins. Again, even if there is SOME resolution after pregnancy, varicose veins in a young woman would give away a probable pregnancy.
The final nasty - some woman experience prolapse of the vagina after birth. This is most unfortunate. There may be a family history of sloppy vaginal muscles with difficulty returning to pre-pregnancy state, or a very long and difficult labour can produce this complication.
I’ve probably missed other points….but I believe it would not take long for an experienced doctor to find a number of these signs once late pregnancy has been reached, and certainly after delivery.