It sounds like you might be looking for Binyan Tzion 154 (R. Yaakov Ettlinger). Although the case discussed is of a man claiming to be Elijah the Prophet, and seducing a woman by telling her that she will become the mother of the Messiah.
To quote sefaria's translation of the question:
Not long ago, an incident came before me that will cause the ears of all who hear it to ring. In one of the villages in my domain live two Jews who regularly take business trips extending several days, leaving their wives alone in the house with their sons and daughters and servants. One day, when one of the men went as was his way on a business trip, another man came from Poland, with torn clothes, and asked the wife for a place to lodge. The woman, who had always been exceedingly modest but whose piety was her folly, took pity on him and gave him a place to sleep and also food and drink. Yet that guest did not eat from her anything that had been alive, and drank nothing but water, and engaged in similar ascetic practices, afflicting himself with mortifications. All day he sat shut in his room with a book in hand, and also each night until midnight, upon which he would grieve over the destruction of God’s Temple. When he slept, he did not lie on a bed or bench, but rather on the ground, with rocks beneath his head. Each day he would immerse himself in the cold waters of the river twice, at the chilliest times. He behaved this way in the woman’s house from Sunday of Parashat Terumah until Shabbat of Parashat Tetzaveh.
But on Friday night, after the meal was over, the children and the house servants all left the table and went to sleep in the other room while that fraudulent man remained seated at the table, alone with the woman. He entered into conversation with her to the point that she asked “Who are you? Where do you come from? Where are you going?” He replied “I am an emissary of the Merciful One, and my name is Eliyahu the Prophet. I seek my brethren, to gather them from the four corners of the earth—but this can be told only to the discreet.” The woman, in her great foolishness believed him. She went to sleep on her bed in the adjacent room, while that menace still sat at his place. He studied a book until midnight, and after midnight he arose, tiptoed over to the bed where the woman was lying, woke her up from her sleep, and said to her: Behold I have travelled from one end of the earth to the other, and I have found no righteous woman to compare to you who is worth to produce the Messiah. The obstacle is your husband, who is not suitable for such. To that end, I have been sent from heaven to sleep with you, and in nine months you will bear a son who will be the Messiah, son of David. He will redeem Israel. This is your sign that I am Eliyahu; this coming Tuesday, after I take leave of you, if you open the door to the closet that stands here in your bedroom, you will find there a great treasure of 400 golden ducats—but only on condition that you do not open the closet before the prescribed time. Thus spoke the adulterer to her, until he seduced her. He defiled her twice, on Friday night and Saturday night, and on Sunday before dawn the adulterer fled from there. His whereabouts are unknown.
For an interesting analysis of R. Ettlinger's response see this article by R. Gidon Rothstein.