In a general sense, yes, asteroids can have magnetic fields - for example, in the article "Magnetic Field Signatures Near Galileo's closest approach to Gaspra" (Kivelson et al. 1993), Gaspra, an S-type asteroid with an unusually metal and olivine abundance exhibited what has been suggested by the article as a measurable magnetic field.
In the article "Observations of the Magnetic Fields Inside and Outside the
Solar System: From Meteorites (~ 10 attoparsecs),
Asteroids, Planets, Stars, Pulsars, Masers, To Protostellar
Cloudlets (< 1 parsec)" (Vallee, 1998) (section 2.1.3 on page 6-7), further information is provided about the asteroid Gaspra and also mentions another S-type asteroid 243 Ida as having a measurable (likely to be remanent) magnetic field.
According to the article "Possible evidence for partial differentiation of asteroid Lutetia from Rosetta" (Weiss et al. 2012), the M-type asteroid 21 Lutetia also had a measurable magnetic field. However,
whether Lutetia has substantial fine-scale remanent
magnetization like that expected from an internal core
dynamo (Weiss et al., 2008) or externally generated fields in the
early solar system (Weiss et al., 2010).
Weiss, B.P., Berdahl, S., Elkins-Tanton, L.T., Stanley, S., Lima, E.A., Carporzen, L.,
2008. Magnetism on the angrite parent body and the early differentiation of
planetesimals. Science 322, 713–716.
Weiss, B.P., Gattacceca, J., Stanley, S., Rochette, P., Christensen, U.R., 2010.
Paleomagnetic records of meteorites and early planetesimal differentiation.
Space Science Reviews 152, 341–390.