The dealer isn't really wrong, but they're being a bit slippery with language. Modern EV batteries are designed to outlast most car ownerships, but "lifetime" gets fuzzy depending on what you mean. Most batteries degrade gradually rather than just dying one day. You'll probably see the pack hold 80-90% of its original capacity after 8-10 years, which most owners won't notice in daily driving. The real question is whether that slower charging speed or slightly shorter range bothers you enough to warrant replacement.
Real-world data from early EV adopters suggests most batteries are still going strong at 150,000 miles or more. Stories about people needing replacements in that 8-10 year window do exist, but they're usually outliers dealing with specific issues - extreme climates, constant fast charging, manufacturing defects. The vast majority get well beyond that without major problems. What matters is that degradation tends to be gradual and predictable, not a sudden cliff.
As for replacement costs, that's where things get murky because prices vary wildly depending on the car and when you're buying. A decade ago battery replacements could run $5,000-$15,000 or more, but prices have dropped as production scales up. If you're looking at a car under warranty, most makers cover the battery for eight years or so anyway, which takes the pressure off. I'd focus more on choosing a model with good real-world longevity reviews and decent warranty coverage than worrying too much about a replacement that might never happen.