In many episodes she encounters non-warp civilizations. The Ocampans are an excelent example. They showed no signs of warp speed as they never left the underground. Yet dispite these facts she not only initiated contact with them but then proceeded to take one of them along on her ship. Another specific example see the omega directive, She went as far as to state that for the duration of the mission, the directive no longer applied. These are only a few examples of various incedents, there are numerous others not only limited to the prime directive but also the temporal prime directive.
It should be noted that in The Omega Directive, the omega directive is a directive from Starfleet which supercedes the prime directive for any captain or starfleet officer/enlisted person.