The former England defender, who joined the club from Leeds in a British record deal in 2002, has won six Premier League titles as well as the Champions League at Old Trafford
The Red Devils will take on the Spanish outfit at Old Trafford to mark more than a decade's service by the defender, who joined the club from Leeds in 2002.
Ferdinand made his United debut on August 27, 2002 in European competition against Zalaegerszeg and has since gone on to win six Premier League titles as well as the Champions League.
"This is going to be a big night for me as well as an emotional one," Ferdinand said in a statement released by his testimonial committee.
"I cannot believe where those ten 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."
Outgoing Old Trafford boss Sir Alex Ferguson is full of praise for the experienced centre-back, who produced his best form for the club last season, according to the Scot.
"It is great that the club are granting Rio a testimonial for his services to the club," Sir Alex added. "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, the fans but it also gets next season's campaign off to a great start."