Upaya in Theravada Buddhism and the Pali Canon
AFAIK, breaking precepts that result in unwholesome Karma is never excused in Theravada Buddhism. Especially the five precepts.

Here are few examples of the Buddha using Upaya:


Showing nymphs to prince Nanada to break his attachment towards Janapada Kalyani.
Breaking Khema's infatuation with beauty by showing a beautiful maiden deteriorate in front of her eyes.
Teaching the stanzas to old brahmin who was mistreated by his four sons.


There might be teachings that appear complete opposite if you take the literal meaning of the words or disregard the context. But the teachings never conflict when you understand the full picture.

The Buddha would scold a monk to get him disciplined, but he would never use physical force. Such a need wouldn't even arise to the Buddha. Although monks are allowed by Vinaya to strike another in self defence.

The Buddha may decide not to keep to a lesser(non-offensive) Vinaya rule on certain occasions, but the monks do not have this freedom.