AMSTERDAM—Weeks before the U.K. decides whether to leave the European Union, the Netherlands will hold a referendum that could deliver a blow to the bloc.

On Wednesday, the Netherlands will vote to support or reject the EU’s association agreement with Ukraine, a pact that deepens economic and political ties with the former Soviet republic and is already ratified by the EU’s 27 other member states.

Although...