A referendum about whether the EU should "put boots on the ground" seems like a good idea to me as long as only those who vote yes get deployed.
Politics (almost) never works like this. In a secret vote, you don't even know who voted yes or no or at all.
Si vis pacem para bellum
I also wonder what good any sort of military/defensive pact is if any country can unilaterally decide when or when not to participate. It means you can’t depend on it and you may as well not have it then right? To be clear I am not saying military pacts are a good thing, but they do currently exist and participating counties can’t (at least shouldn’t) just pretend they aren’t part of one when it’s inconvenient.