It's certainly possible to make an undemocratic decision democratically.
Consider holding a referendum that specified nobody who hadn't yet been born as of the referendum date would ever be allowed to vote.
It's a purposefully silly example (HN isn't for political debates!) but broadly, it's a democratically made self determination that reduces or precludes the ability to make democratic decisions in the future.