A hadith like this has been transmitted on the authority of Shu'ba.
Sahih Muslim Book 16, Hadith 165
← Previous Hadith
Perhaps he (the man accompanying her) intends to cohabit with her. They said: Yes. Thereupon Allah's Messenger (ﷺ) said: I have decided to curse him with such a curse as may go along with him to his grave. How can he own him (the child to be born) and that is not lawful for him, and how can he take him as a servant for that is not lawful for him?
Sahih Muslim Book 16, Hadith 164 Next Hadith → I intended to prohibit cohabitation with a suckling woman until I considered that the Romans and the Persians do it without any injury being caused to their children thereby. (Imam Muslim said: Khalaf reported it from Judamat al-'Asadiyya, but the correct wording is what has been stated by Yahya.)
Sahih Muslim Book 16, Hadith 166
Sahih Muslim Book 16, Hadith 164 Next Hadith → I intended to prohibit cohabitation with a suckling woman until I considered that the Romans and the Persians do it without any injury being caused to their children thereby. (Imam Muslim said: Khalaf reported it from Judamat al-'Asadiyya, but the correct wording is what has been stated by Yahya.)
Sahih Muslim Book 16, Hadith 166