Brais Mendez opened the scoring for hosts inside four minutes after Alessandro Bastoni lost possession.
Martinez levelled in the 87th minute, latching on to Davide Frattesi’s cross.
In the 66th minute, referee Michael Oliver overturned his decision to send off Inter’s Nicolo Barella after a video assistant referee review.
The midfielder had been shown a straight red card for what initially appeared to be a stamp on Mendez, but English official Oliver reversed his call after going to the pitchside monitor.
Moments later Sociedad almost added a second when Hector Moreno headed a corner against the crossbar.
Last season Inter lost 1-0 to Manchester City in the final in Istanbul.
Elsewhere in Group D, Red Bull Salzburg secured top spot as things stand as they beat 10-man Benfica 2-0.
The visitors were awarded a second-minute penalty when Benfica goalkeeper Anatoliy Trubin caught Strahinja Pavlovic, but Karim Konate blasted the spot-kick over the bar.
Salzburg were given a second penalty 13 minutes later, with Benfica defender Antonio Silva sent off for handling the ball on the line.
This time around forward Roko Simic opened the scoring from 12 yards.
Oscar Gloukh added a second in the 51st minute and the Austrian Bundesliga champions held on to win away in Europe’s elite competition for the first time in three years.