Ferreyra had an evening to forget, wasting an earlier opportunity to make it 1-0 on the night and 2-0 on aggregate with Roma's Federico Fernandez - having allowed Ferreyra through on goal - recovering to force him to shoot wide.
Neither side could find the breakthrough by half time, but the Giallorossi went on to take the lead not long after the restart when Dzeko sprung the offside trap to latch on to a Kevin Strootman through-ball.
The former Manchester City striker, who has been linked with a move back to the Premier League, but said after the match that he did not want to leave Roma, was given a rousing send-off by the home fans when he was substituted in the dying minutes.
Tennessee Titans to sign former New England Patriots CB Malcolm Butler
He started 15 of 16 games in New England, but did not play a single down in the team's Super Bowl loss to the Eagles. Butler's departure leaves the Patriots with a need at cornerback this offseason.
He added: "Everyone deserves a standing ovation because we all gave absolutely everything, right up until the last minute". "I don't have a preferred opponent: they are all strong teams, but we will play to win against anyone".
Alessandro Florenzi came close to turning in an own goal at the 10-minute mark, one that would have been a crippling blow to Roma's comeback hopes.
The game only really came to life at the midway point of the first half, with Pyatov cutting out Aleksandar Kolarov's driven cross ahead of Dzeko at the near post on 24 minutes, before Taison fizzed a strike over the crossbar from distance for the visitors four minutes later.
The home side came out with renewed goal in the second half and Dzeko delighted Roma fans when he broke the deadlock with a trademark clinical finish.
49ers among finalists to land All-Pro guard Andrew Norwell, per report
Third-year player Joshua Garnett missed all of last season with a knee injury and is an uncertain fit in Kyle Shanahan's offense. Later, Ohio State's Billy Price, Georgia's Isaiah Wynn, UTEP's Will Hernandez and Iowa's James Daniels could be options.
Shakhtar's uphill battle then became even steeper when Ivan Ordets received his marching orders for a foul on Džeko - a decision which made tensions in Rome reach boiling point.
Despite being a man down, Shakhtar launched a late onslaught and had several unsafe raids down the left flank but the home team's defence held on until the final whistle.
"A fantastic result, a fantastic Roma", he said on the club's official twitter account.
Sam Bradford, Cardinals Agree to 1-Year, $20M Contract with Option
The Cardinals have been looking for a replacement at quarterback following the retirement of Carson Palmer after the 2017 season. Earlier he had tweeted that the figures the two sides were exchanging were in the area of $28 million per season.