Mahrez returned to training on Friday after captaining his country to victory in the Africa Cup of Nations in July.
But he missed the penalty-shootout win over Liverpool through fears he could fall foul of doping rules.
“The doctors did not have exactly the medicines,” said Guardiola.
“Riyad called me just after being (crowned) champion with Algeria and said, ‘I want to come back in 10 days, I want to play against Liverpool’.
“I said, ‘You are more than welcome, it’s perfect you come’.
“But we don’t have what he took… about the medicine. That’s why, for doping control, today was a risk because the doctors didn’t have it. That’s why he wasn’t in the squad to play some minutes.
“Hopefully he will be back next game against West Ham and in the future everything will be normal.”
It is unknown what medicine Mahrez, 28, was given and what it was administered for.