The preferred battery for EVs is the Lithium-Ion type, which is constructed from lithium, cobalt, manganese, graphite and nickel.
Battery technology has move on considerably in the 15 years since the first hybrid cars were released onto the market, and rare earths are no longer required for their construction. (The Nickel-Metal Hydride cell enjoyed some brief popularity during the mid-2000s, but was quickly overtaken by progress).
Conversely, a rare earth material, cerium, is used in vehicles which are powered with internal combustion engines. It is one of the materials used in the catalytic converters. In fact, 26% of the rare earths which are mined are used as catalyst materials. These are to be found primarily either in car exhaust systems, or else in the petroleum refining industry.
As one wag recently summed matters up: "There are a total of 17 rare earth elements in the Periodic Table, and none of them are named lithium, cobalt, manganese, carbon (graphite) or nickel".