No, that would not be necessary in order to ask the girl, "Was this man hitting you?"
I see you're now dodging the whole question of determining if a crime had been committed.
And why was knowing his name necessary in order to ask the girl?
The guy approached the cop. The cop has a right to know who is approaching him and why he approached him.
Baloney. The guy had as much right to be walking along the shoulder as the cop did; if the cop was concerned, he needed only to say, "Stand back, sir, I'm conducting an investigation."