The Premier League champions will take on Spanish side Sevilla at Old Trafford just two days before United face Wigan in the Community Shield at Wembley Stadium.
The 34-year-old centre-half recently signed a one-year extension to his contract with the club after completing his 11th season under the now-retired Sir Alex Ferguson.
"This is going to be a big night for me as well as an emotional one," said Ferdinand. "I cannot believe where those 10 years have gone and I am lucky to have spent them here at Manchester United.
"This club is unique in every way, the history and drive of the place is unbelievable, it spurs everyone to succeed.
"The fans are the best in the world, their commitment is amazing and I have appreciated their support throughout my career. I hope they enjoy the night as much as I intend to."
Ferguson, who signed Ferdinand from Leeds in 2002, added: "It is great that the club are granting Rio a testimonial for his services to the club.
"He is one of the best central defenders this club has seen. Rio has a natural ability to read the game and I said last month that I believed that this season has been the best of his Manchester United career.
"It will be a fantastic night for him and the fans, but it also gets next season's campaign off to a great start."