The caller asked staff at St Mary's Primary School in Paisley, Renfrewshire, to tell the youngster not to take the bus home as he would collect her.
Instead they contacted the pupil's parent who confirmed that they had made no such call.
Police were informed and the school has written to parents, alerting them to the incident.
Pupils have been reminded about getting to and from school safely and not giving out personal details online.
A Police Scotland spokeswoman said: "Inquiries are continuing into the allegation."
A Renfrewshire Council spokesman told the Paisley Daily Express: "Prompt action by staff at St Mary's Primary School has averted a potentially very serious child protection incident.
"Pupils at the school are now being reminded not to put any personal details on social networking sites, especially information which could identify them or where they go to school."