Zellweger had an NHL career-high 22 points (seven goals, 15 assists) in 76 regular-season games for the Ducks this season and two points (one goal, one assist) in three Stanley Cup Playoff games.
The 22-year-old can become a restricted free agent on July 1.
Selected by Anaheim in the second round (No. 34) of the 2021 NHL Draft, Zellweger has 51 points (16 goals, 35 assists) in 164 regular-season games.
A second-round pick (No. 39) by Buffalo in the 2023 NHL Draft, Wahlberg had 37 points (nine goals, 28 assists) in 68 games for Rochester of the American Hockey League this season. The 20-year-old has spent the past two seasons with the Sabres' AHL affiliate.
The trade comes three days after Buffalo sent defenseman Bowen Byram and forward Jordan Greenway to the Chicago Blackhawks for defenseman Louis Crevier, and a first-round pick and second-round pick in the 2026 draft.
The Sabres also traded forward Alex Tuch to the Washington Capitals on Wednesday for forward David Kampf and a third-round pick in the 2027 NHL Draft.