Yes and no
In the old days prior to the advent of acid blockers in the 1970's, doctors used to recommend drinking a glass of milk every 2 hours.
Milk does temporarily neutralize acid, but as any food, it will stimulate more acid production in the stomach as well. In a pinch, it will provide some relief for a short period of time. An hour or two. Hence the advice of drinking some every 2 hours.