  Isolated neutron stars that are asymmetric with respect to their spin axis
are possible sources of detectable continuous gravitational waves. This paper
presents a fully-coherent search for such signals from eighteen pulsars in data
from LIGO and Virgo's third observing run (O3). For known pulsars, efficient
and sensitive matched-filter searches can be carried out if one assumes the
gravitational radiation is phase-locked to the electromagnetic emission. In the
search presented here, we relax this assumption and allow the frequency and
frequency time-derivative of the gravitational waves to vary in a small range
around those inferred from electromagnetic observations. We find no evidence
for continuous gravitational waves, and set upper limits on the strain
amplitude for each target. These limits are more constraining for seven of the
targets than the spin-down limit defined by ascribing all rotational energy
loss to gravitational radiation. In an additional search we look in O3 data for
long-duration (hours-months) transient gravitational waves in the aftermath of
pulsar glitches for six targets with a total of nine glitches. We report two
marginal outliers from this search, but find no clear evidence for such
emission either. The resulting duration-dependent strain upper limits do not
surpass indirect energy constraints for any of these targets.
