Ballard, 22, had been set to sign for Burnley on a permanent deal last week but the deal broke down in its final stages as terms could not be agreed.
He spent last season on loan at Millwall and again impressed, having spent the previous campaign at Blackpool.
Ballard’s strong performances have also seen him become a regular for Northern Ireland. He has picked up 15 senior caps since making his debut in 2020.
Sunderland will compete in the Championship next season for the first time since the 2017-18 campaign, after they beat Wycombe Wanderers in the League One play-off final.
Ballard, who never made a first-team appearance for Arsenal, played 33 times for Championship side Millwall last season.
He made 30 appearances for League One Blackpool in the 2020-21 campaign.
Burnley, meanwhile, moved for Oxford United defender Luke McNally after their move for Ballard failed to materialise.