But with the photograph clearly showing Hafeez and the unnamed individual were within the two-metre guideline for social distancing, the Pakistan Cricket Board (PCB) announced later Wednesday the all-rounder would be isolated.
"This morning, Mohammad Hafeez went to a golf course, which is adjacent to the team hotel and part of the bio-secure bubble," said a PCB statement.
"During the golf round, he was photographed with a member of the public, which he subsequently posted on his social media account.
"As it was evident from the photograph that Hafeez had breached the two-metre social distancing protocol and following a consultation process with the team doctor, the team management has decided to isolate him until he returns a negative Covid-19 test.
"Hafeez underwent the Covid-19 test late Wednesday afternoon and the result is expected at some stage on Thursday."
This series is being played under special protocols because of the global coronavirus outbreak, with the PCB statement adding the decision to isolate Hafeez had been taken "for his and the safety and security of everyone around him".
"The team management believes it was an inadvertent mistake, but a good reminder for everyone on the importance of following the bio-secure protocols, which have been designed for the health and safety of everyone involved in the series."
The PCB said the England and Wales Cricket Board had been informed of their action regarding Hafeez.
While players from both teams have been permitted to use the golf course at the Ageas Bowl, they have been advised to avoid interaction with anyone outside the 'bubble' as the course remains open to the public.
The 39-year-old Hafeez is not a member of Pakistan's Test squad, but is on the tour ahead of the three-match Twenty20 series starting on August 28.
An opening batsman and off-spinner, Hafeez tested positive for COVID-19 before leaving Pakistan.
Hafeez then had a private test of his own, which produced a negative result.
He then returned two more negative tests, with the PCB then allowing him to travel to England.
Earlier this week, English county side Kent announced teenage batsman Jordan Cox, fresh from scoring an unbeaten double century in only his second first-class innings, had been dropped from their next match after posing for a photograph with a member of the public and would go into self-isolation.
Last month's England-West Indies, which marked international cricket's return from lockdown, saw England fast bowler Jofra Archer forced to miss the second Test at Old Trafford after he breached the protocols by returning home before travelling to Manchester.