Ferrari president Sergio Marchionne says the team could exit Formula 1 if it does not approve of the direction taken by owners Liberty Media.