The calculation of magnetic anisotropy constants is performed beyond the
point charge model for a continuous charge density distribution of screening
conduction electrons. An important role of the non-uniform electron density, in
particular, of the Friedel oscillations, in the formation of crystal field is
demonstrated. Such effects can modify strongly the effective ion (impurity)
charge and even change its sign. This enables one to justify the anion model,
which is often used at discussing experimental data on hydrogen-containing
systems. Possible applications to the pure rare-earth metals and RCo5 compounds
are discussed. The deformation of magnetic structure near the interstitial
positive muon owing to the strong local anisotropy, and the corresponding
contribution to the dipole field at the muon are considered.Comment: 10 pages, RevTeX, 3 figure