Using DynamicResources as @stonstad explained is an easy (only xaml) way to achieve that. You can also define the template in a base style, and then extend that style for different buttons using different images:
<Style x:Key="BaseButtonStyle" TargetType="Button">
<Setter Property="Template"> ... </Setter>
</Style>
<Style x:Key="OkButton" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
<Style.Resources>
<BitmapImage x:Key="_UpImage" UriSource="Controls/Buttons/ok_up.png"/>
<BitmapImage x:Key="_DownImage" UriSource="Controls/Buttons/ok_down.png"/>
<BitmapImage x:Key="_OverImage" UriSource="Controls/Buttons/ok_over.png"/>
<BitmapImage x:Key="_DisabledImage" UriSource="Controls/Buttons/ok_up.png"/>
</Style.Resources>
</Style>
<Style x:Key="CancelButton" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
...
</Style>
Another option would be defining a set of attached properties to specify the images directly in each button, and then bind these properties from the template. That will allow you to use a single style:
<Button
local:ButtonImages.UpImage="Controls/Buttons/ok_up.png"
local:ButtonImages.DownImage="Controls/Buttons/ok_down.png"
... />
<Button
local:ButtonImages.UpImage="Controls/Buttons/cancel_up.png"
local:ButtonImages.DownImage="Controls/Buttons/cancel_down.png"
... />