There is a great difference between the notion of modulation -- i.e., changing from one tonality to another -- and the notion of destabilizing a given tonality by undoing the intervals that define it. To modulate is to go from one stable setup to another via some recognized transitional chord progression.
This is entirely different from allowing the intervals made by the intruding sharp or flat convey their full power, not on the way to something more desirable, but in their own right.
I just finished playing the late Mozart F major Sonata in which the prevalence of two-part writing exposes those intervals. I remembered distinctly how I used to play the piece in modulation mode. Now, after focusing on cantabile, I pay much greater attention to the articulations which often delay moments of resolution in favor of the pregnant unease of a chromatic tone that has the power to change the modality--a much greater power than a shift from an identifiable "here" to an all-too-predictable "there."