Mountain bikes can certainly be ridden without a dropper post, and for many years we didn’t even have the option. While many riders were slow to adopt this new technology due to weight and reliability concerns with early models, they have since become ubiquitous on most bikes for many reasons.
Over the past decade, dropper posts have become lighter, more reliable, and more durable. The ability to raise and lower your seat for the terrain in front of you allows you to always have the appropriate saddle height, whether you are riding up or downhill. Adjusting saddle height on the fly makes it easier to move about the bike and move the bike beneath you, resulting in greater control.
While some posts are quite expensive, there are also more affordable options that work very well. Price is less of a limiting factor than it once was.
So, yes, unless you are an elite-level XC racer who is trying to have the lightest bike possible — and may opt for a lighter rigid post — you should absolutely be riding with a dropper post on your mountain bike. The performance benefits far outweigh the weight penalty of adding one to your bike.