Hivert (Direct Energie) moved to the front with 20km left and soon became part of a three-man breakaway with Sanchez (Astana) and Remy Di Gregorio (Delko Marseille Provence KTM).
Di Gregorio tried to drop his rivals toward the end with three unsuccessful attacks and finished third, with Sanchez unable to respond to Hivert's acceleration close to the finish line.
"I didn't make any plans. I knew that I should try to follow the riders who broke clear or I'd be in trouble," Hivert said. "I played a little with the two others because in my head I knew I had it won before the line. But I needed to do it first.
"I progressed well this season and I really wanted to do well in this Paris-Nice.What changed is I had problems with my knees in recent seasons and I had an operation to both knees and now everything's fine. It's great for Direct Energie to have a win here already.
"I hope for more great things to come. We also have Lilian Calmejane who is in great shape. I think we can look for good things to come. Pairs-Nice is already a success. We must try again."
Sanchez, who won Paris-Nice in 2009, took the overall lead from Arnaud Demare (Groupama-FDJ) who won the bunch sprint 38 seconds later.
Sanchez has a 28-second general classification lead over Demare, with Gorka Izagirre (Bahrain-Merida) third at 35 seconds.
"I was a little nervous towards the end after the team did such a great job," Sanchez said. "But the finale suited me, that's exactly the kind of finishes I like.
"I wanted to go for the stage win but the yellow jersey is a good consolation. I'm going first to try to recuperate and do my best to keep that jersey.
"Paris-Nice really starts tomorrow. The last two stages will also be extremely difficult especially Saturday's with a long climb. the favourites did not say their last word.
"Tim Wellens is very strong as he showed by winning in Andalucia, Julian Alaphilippe will be especially motivated. There is also Wout Poels, it's far from over."
Wednesday's fourth stage is an 18.5km time trial around Saint-Etienne.