The constitution of a nation and its practices are separate axes. Many US states practiced the functional equivalent of apartheid until the 1960s, but the USA was still a democracy nevertheless.
(This is not intended to reflect any opinion I may have about Israel's specific practices.)
(This is not intended to reflect any opinion I may have about Israel's specific practices.)