Yes, that is a well-known account of Sai Baba's divine play. According to Chapter 12, a doctor who was a Brahmin and a worshipper of Ram accompanied his friend to Shirdi. The doctor was very skeptical, telling his friend he would not bow at the feet of a Muslim. He made a firm resolution about this. However, a surprising thing happened when they entered the Masjid for Darshan. The doctor, who had been so adamant, was the first one to prostrate. His amazed friend asked him why he forgot his resolution. The doctor explained the wonder he had just witnessed: he saw the beautiful, dark-complexioned form of his beloved deity, Lord Ram, seated where Baba was. He bowed to that form instinctively. This incident, described in Chapter 12, left the doctor in awe of Baba's true nature.
I heard a story about a doctor who refused to bow to Sai Baba. What happened when he went to Shirdi?
π Chapter 12