A long pass tricked the keeper, who unreasonably advanced outside the area, as the ball hit the ground and went over his head.
The ball then found Ismaili's Nigerian striker Ndubuisi Godwin, who slotted into an empty net.
The much-needed 1-0 victory lifted the Dervishes to Group B third place on three points.
Nigeria's Heartland are now languishing at the bottom of the group with a sole point.
JS Kabylie, who beat second-placed Ahli 1-0 on the same day, are the group leaders with nine points.
Hosts Ismaili carved out several scoring chances after their goal.
A powerful header from Motasem Salem seemed to be on its way home but it deflected off Ismaili's Ahmed Ali to go wide.
Amr Al-Sulaya also wasted a clear-cut opportunity when he feinted past the goalie but his tame effort was cleared by a defender.