Is 'in contrast' always followed by the preposition 'to', or are there situations where it can correctly be followed by 'with' or a different preposition?
You can use either in contrast to or in contrast with.
Without considering by/in contrast (i.e., when there is no preposition after by/in contrast, as suggested in the comments above), both in contrast to and in contrast with are equally valid.
From Garner's Modern American Usage:
in contrast with; in contrast to. These are equally good. See contrast (A).
contrast. A. Prepositions with. One contrasts something with—not to—something else. But it’s permissible to write either in contrast to or in contrast with. Cf. compare with.
(You can find a quote by Bryan Garner, the author of Garner's Modern American Usage in The Oxford Dictionary of American Usage and Style, which was quoted on this site under "compare with" or "compare to".)