The ECB slapped the ban on Rehman, who play for Somerset in English County Championship, under its anti-doping rules. The penalty is binding on all countries signed up to the World Anti-Doping Code.
The sample that tested positive for cannabis was provided by Rehman on August 8 during the County Championship match between Somerset and Nottinghamshire.
Rehman will be suspended until midnight of December 21.
He has already been withdrawn from the Sialkot Stallions squad for the Champions League Twenty20, which begins on October 9 in South Africa.
"I apologise to my family, the PCB, the ECB, Somerset County Cricket Club, my team-mates and my fans. It was an error of judgement on my part that will cost me dearly and I would like it to be a lesson to all others in sports elsewhere," Rehman said.
"I will do my best to stay fit and focussed during my suspension, and, god-willing, will be available for selection for the India series should the PCB see it fit," he added.
Somerset chief executive Guy Lavender said the club supported the ECB's decision.
"The club does not condone the use of illegal drugs in any circumstances and all Somerset players are made fully aware of this policy on a regular basis," said Lavender.
Rehman played four Championship matches for Somerset and took 27 wickets, which included 9 for 65 against Worcestershire.
He had established himself as a key player for Pakistan over the past year and caused England plenty of problems during the Test series in the UAE, where he claimed 19 wickets in three matches.
Overall he has 81 wickets in 17 Tests at 28.40 apiece.