Can I eat yogurt if my doctor tells me to
Yes. In Jainism, yogurt is generally considered acceptable for laypersons because it is a dairy product and not meat.
If your doctor advises it for health, you may take it with awareness and moderation. Jain Dharma also values care of the body when needed, while still following ahimsa and restraint.
If you follow stricter vows or specific practices, you may choose the most careful and least harmful form.