Ron Dennis says Lewis Hamilton could be attracted back to McLaren once the team "returns to the level of competitiveness enjoyed in the past".