Experimental investigations of the magnetic properties of dilute alloys of the rare-earth solutes Tb, Dy, Ho, Er, and Tm in the nonmagnetic hosts Lu, Y, and Sc have been performed. These measurements, which include and supplement earlier published results, have been analyzed and crystal-field parameters for all these 15 alloy systems deduced. The consistency of the parameters was confirmed by a variety of magnetic measurements, including neutron spectroscopy. Crystal-field parameters have also been derived for the ions in pure magnetic rare-earth metals and their alloys using the results for the dilute alloys supplemented with paramagnetic measurements up to high temperatures on the concentrated systems. Mean values and standard deviations of the higher-order crystal-field parameters for all Y and Lu alloys are B40 / β=6.8±0.9 K, B60 / γ=13.6±0.7 K, and B66 / γ=(9.7±1.1)β60 / γ. These values—with the inaccuracies somewhat increased—are expected to be representative also for the magnetic rare-earth metals. For rare-earth ions in the Sc host the values B40 / β=9.9±1.9 K, B60 / γ=19.8±1.5 K, and B66 / γ=(9.4±0.9)β60 / γ were deduced. B20 / α is a host-sensitive parameter which has the average values of -102.7, -53.4, and 29.5 K for rare-earth ions in Y, Lu, and Sc, respectively. There is also evidence that this parameter varies with the solute. B20 / α for ions in the pure magnetic rare-earth metals and their alloys shows a linear variation with c / a ratio characteristic of each ion. The results indicate a contribution from anisotropic exchange to the high-temperature paramagnetic anisotropy of approximately 20% for Tb, Dy, Ho, and Er, and approximately 10% for Tm.