The answer is yes, but it's not always straightforward. Often the battery will be replaced under warranty and the old one will be repaired and used for energy storage projects.
If the battery is out of warranty, there are third-party EV battery specialists. The easiest batteries to repair are air-cooled ones. The Nissan Leaf and Renault Zoe are two examples.
Liquid-cooled batteries, which are in the majority of EVs, are more involved as the coolant needs to be emptied and re-injected into the system before and after, and requires specialist equipment which takes longer and costs more.
If you have a specific EV maintenance issue specialists, such as Cleevely Motors, will be able to advise you on your options.