  Several B-type main-sequence stars show chemical peculiarities. A
particularly striking class are the $^3$He stars, which exhibit a remarkable
enrichment of $^3$He with respect to $^4$He. This isotopic anomaly has also
been found in blue horizontal branch (BHB) and subdwarf B (sdB) stars, which
are helium-core burning stars of the extreme horizontal branch. Using a hybrid
local/non-local thermodynamic equilibrium (LTE/NLTE) approach for B-type stars,
we analyzed high-quality spectra of two known $^3$He BHBs and nine known $^3$He
sdBs to determine their isotopic helium abundances and $^4$He/$^3$He abundance
ratios. We redetermined their atmospheric parameters and analyzed selected
neutral helium lines, including $\lambda$4922 $\mathring{A}$ and $\lambda$6678
$\mathring{A}$, which are very sensitive to $^4$He/$^3$He. Most of the $^3$He
sdBs cluster in a narrow temperature strip between 26000 K and 30000 K and are
helium deficient in accordance with previous LTE analyses. BD+48$^\circ$ 2721
is reclassified as a BHB star because of its low temperature
($T_{\mathrm{eff}}=$ 20700 K). Whereas $^4$He is almost absent
($^4$He/$^3$He$<$ 0.25) in most of the known $^3$He stars, other sample stars
show abundance ratios up to $^4$He/$^3$He$=$2.51. A search for $^3$He stars in
the ESO SPY survey led to the discovery of two new $^3$He sdB stars (HE
0929-0424 and HE 1047-0436). The observed helium line profiles of all BHBs and
of three sdBs are not matched by chemically homogeneous atmospheres, but hint
at vertical helium stratification. This phenomenon has been seen in other
peculiar B-type stars, but is found for the first time for sdBs. We estimate
helium to increase from the outer to the inner atmosphere by factors ranging
from 1.4 (SB 290) up to 8.0 (BD+48$^\circ$ 2721).
