Social service officials were reportedly acting on a court order, and temporarily placed the baby in foster care