Farhadi struck after good work from Hossein Mahini and Al Rayyan had Brazilian defender Moises sent off in the closing stages to end their hopes of a fightback and leave the Qatari side bottom of the group with one point.
The hosts' first chance was fired over the bar by Igor Castro in the 11th minute and home keeper Shahab Gordan denied Al Rayyan an opener three minutes later. Rodrigo Tabata fired a free-kick into Zob Ahan's six-yard box which eluded his team-mates but looked set to curl straight in only for Gordan to react well and keep out his effort.
It was the Qatari side who threatened again two minutes later but Fabio Cesar’s powerful strike from outside the box was off target.
Zob Ahan started to take control of the game and Igor Castro set up Mehdi Rajabzadeh, whose side-footed strike flew wide, before Mahini's long-range effort was gathered by Soud Al Hajiri in the Rayyan goal.
Their efforts were rewarded a minute later when Mahini ran onto a long ball and dummied a defender before setting up Farhadi, who fired past the keeper into the far corner.
Mohammad Reza Khalatbari had a good opportunity to double the hosts’ lead but fired over, before his pass set up Mahini who curled just wide.
Two minutes before the break, Abdullah Afifa was narrowly off target with an acrobatic volley which flashed wide of the goal.
Zob Ahan picked up where they left off at the start of the second half, Jalal Rafkhaei’s shot unsuccessful before defender Mohammad Hosseini tested Al Hajiri, who turned the ball away for a corner.
But Gordan had to be alert at the other end to kick away a dangerous cross from before an Al Rayyan attacker could get a touch.
Rodrigo’s effort from the edge of the box was gathered by Gordan as the away side pressed for an equaliser, and Zob Ahan failed to make the game safe when Al Hajiri raced out to intercept Farhadi’s through ball.
Rodrigo saw another long-range effort deflected over before Al Hajiri kept out Khalatbari’s free-kick.
Moises collected his second yellow card in stoppage-time as the match finished on a low note for Al Rayyan.