Spanish Prime Minister Pedro Sanchez has said he could oppose the Brexit deal without further information about the future of Gibraltar.