His comment was reported by the Italian news agency ANSA as he prepared for Sunday's Japanese Grand Prix at Fuji.
"It's impossible for me not to be at Ferrari next season because I have a contract that expires a year later," said Massa, who is fourth in the drivers' standings with three races remaining this season.
"The 20 points that separate me from (leader Lewis) Hamilton don’t help but we can still be competitive."
Massa added he would be willing, if necessary, to help third-place Finnish teammate Kimi Raikkonen, who trails Hamilton by 13 points.
Fernando Alonso is second, 2 points behind the leader.
"If I no longer had a chance, I wouldn't mind helping (Raikkonen)," Massa told ANSA.
Massa has won three races this season but scored zero points three times.
He said he hoped to stay with the Italian team until the end of his career.