Do rare earth metals actually repel sharks?
Short answer
Electropositive metals such as the Lanthanides generate electrical currents when they come in contact with (sea) water. This electrical activity may repel sharks by over-stimulating their lateral line organ. However, the effectiveness of lanthanides as shark repellent depends on many factors. For example, hungry sharks, or sharks engaged in a feeding frenzy may simply ignore the stimulus altogether. 

Background
Rare earth metals are Lanthanides - metals with a low electronegativity. Metals with low electronegativity are called electropositive. Electropositive metals (EPMs) react vigorously with water when immersed and generate electrical potentials that are thought to overstimulate the sharks’ highly sensitive electroreceptors, the ampullae of Lorenzini. 

Many electropositive metals fall in groups I and II of the periodic table and explosively react with water. Examples include sodium and lithium. The Lanthanides, on the other hand, contain some less reactive elements. 

There is in fact a considerable body of primary literature on the use of EPMs to deter sharks, because the by-catch of sharks is a recognized problem of modern fishery. However, much of this literature shows very mixed results of EPMs, and therefore I have based my (second :-) answer attempt on a recent review article by Hart and Collin (2015), which is available on-line and cites some fifteen primary research articles on the topic: 

EPMs are primarily intended as a mechanism to reduce shark bycatch and catch depredation in longline fisheries, without affecting the catch of non-electrosensitive target teleost fishes. As you indicate in the question, EPMs can be formed into shapes that are easily attached to a fishing line or hook. 

Early tests in the laboratory with captive sharks showed that several EPMs (including magnesium and rare-earth lanthanide elements such as cerium, lanthanum, neodymium and praseodymium) were effective in repelling various shark species. However, more recently, several studies showed no such repellent effects other species of shark, and it was shown that aversive behavior was highly dependent on various factors such as duration of food deprivation prior to testing. Specifically, hungry sharks ignored the EPM, especially when feeding in groups (feeding frenzies).

The results of field trials with EPMs were also mixed, with some studies showing a reduction in the catch rate of various shark species, while other studies showed no such effect. The authors of the review article summarize a range of factors that may influence the efficacy of EPMs in repelling sharks, including the type of EPM used, the relative sensitivity of the electrosensory system, shark density and competition, hunger level, and differences in feeding ecology. Other impediments to large-scale adoption of EPM technology by commercial fisheries include the relatively high cost of the rare-earth metals (although magnesium may represent a cheaper alternative), potential toxicity to other marine animals, and the fact that they dissolve rapidly in seawater and, therefore, must be replaced frequently. The use of EPMs for personal shark deterrent devices is also hampered by the limited effective range (&lt;85 cm) of the electrical field they generate.

Instead, for use in scuba dive gear a rechargeable battery-powered capacitor-discharge unit connected to two or four electrodes is sufficient as shark repellent. Also, electro-magnetic induction using permanent magnets may be a more suitable alternative (Hart and Collin, 2015).

Regarding the great white: this shark has a lateral line featuring ampullae of Lorenzini, so EPMs may repel it, theoretically. 

Reference
- Hart &amp; Collin. Integrative Zoology; 10(1): 38–64