The 48-year-old Montanier will replace Frederic Antonetti, who said he was stepping down after four seasons in Rennes.
"He will join the first team for the return to training scheduled on July 1," Stade Rennes said on their website, without disclosing any detail about the deal.
Rennes, who lost the League Cup final to Saint-Etienne last month, are 11th in the Ligue 1 table.
Sociedad had earlier announced the Frenchman's departure following his refusal to extend his contract at the club he joined two years ago from French side Valenciennes.
Sociedad are fourth in La Liga and close to securing a place in Champions League qualifying for next season.
They said they would focus on their remaining two games, at home to Real Madrid on Sunday and at Deportivo La Coruna the following weekend, before turning their attention to finding Montanier's successor.
"For that reason, Real Sociedad will make an announcement on this issue after the two remaining games," the club said on their website.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.