Abu Bakr set out for the pilgrimage with the Messenger of Allah ﷺ, and Asma bint Umays was with him. She gave birth to Muhammad bin Abu Bakr at Shajarah. Abu Bakr came to the Prophet ﷺ and informed him. The Messenger of Allah ﷺ instructed him to tell her to perform a ritual bath, then enter the state of consecration for the pilgrimage and do everything the other pilgrims do, except that she should not perform the circumambulation of the House.
حدثنا أبو بكر بن أبي شيبة حدثنا خالد بن مخلد عن سليمان بن بلال حدثنا يحيى بن سعيد أنه سمع القاسم بن محمد يحدث عن أبيه
أنه خرج حاجا مع رسول الله ﷺ ومعه أسماء بنت عميس فولدت بالشجرة محمد بن أبي بكر فأتى أبو بكر النبي ﷺ فأخبره فأمره رسول الله ﷺ أن يأمرها أن تغتسل ثم تهل بالحج وتصنع ما يصنع الناس إلا أنها لا تطوف بالبيت
[Its chain of transmission is sahih] Nasai narrated it, in the chapters on the rites of Hajj, ghusl for ihlal, hadith 2665, from the hadith of Khalid, with this wording, and Ibn Khuzayma graded it sahih, 4/167, 168, hadith 2610, and the hadith has other routes of transmission.