The man, believed to be in his 40s, reportedly asked the girl for a hug and gave her flowers as she walked home from school