The 32-year-old is currently on loan at the Toffees from Manchester City, but, unless he signs a new deal at the Etihad Stadium, he will become a free agent in the summer.
"Gareth knows that he can stay at Everton as long as he wants to," Martinez told reporters.
"He is a unique footballer. When he came here, I wanted him to be very important for Everton, to enjoy his football.
"He is enjoying his football. He is an incredible leader. All I want is for him to keep doing this until the end of the season and then, in my eyes, he should be helping England in the World Cup."
Barry, who has not played for England since May 2012, has only missed two Premier League matches for Everton since arriving on Merseyside in September.