Your friend can rent her HDB flat to her relative who is a Malaysian PR. However, the baby must have a valid pass to stay in Singapore.
Tourists are not allowed to rent HDB flats, and all non-citizens legally residing in Singapore must hold valid passes such as Employment Passes, S Passes, Work Permits, Student Passes, Dependant Passes, or Long-Term Social Visit Passes with a validity period of at least 6 months.