Real Sociedad came into the game after nine consecutive wins in all competitions, almost scoring in the 29th minute as Japanese youngster Take Kubo’s strike hit the crossbar.
But their hopes of inflicting a surprise defeat on Barca at the Camp Nou were dashed when striker Brais Mendez was shown a straight red card in the 40th minute for a wild challenge on Sergio Busquets.
Barcelona were the better side for most of the game after that, only scoring once thanks to a brilliant counter-attack from man-of-the-match Dembélé in the 52nd minute.
The electric winger raced down the right channel after a perfectly placed long pass from his French teammate Jules Kounde and smashed an unstoppable right foot into the top corner.
Sociedad should have equalized seven minutes later, but Alexander Sorloth missed a sitter and fired a shot from inside the box from a Kubo cross.
After Gavi hit the crossbar in the 68th minute from a superb cross from Dembele, Real made a late push and could have scored at least three times, with Barça keeper Marc-Andre ter Stegen making a string of saves to secure victory set.
“It was a struggle for us after they went out with one man because they were tight and defended relentlessly,” Barca defender Ronald Araujo told Movistar Plus.
“I’m sure (coach) Xavi will slap us on the wrist, we probably should have finished the game earlier. Now we have to correct the mistakes and move on. I’m happy because we won at home and we’ll continue with a good run.”
In the other quarter-finals, Sevilla will face Osasuna later on Wednesday, while Real Madrid will face Atletico Madrid and Valencia will face Athletic Bilbao on Thursday.