They question has too many variables to answer properly.
"What would happen if a NATO/EU country were to assassinate a Third world dictator by using a military sniper rifle in a third country within the European Union?"
Is the country acting on its own, or in concert/with the approval of other NATO and/or EU countries? Is this part of a wider operation, or a single act? Is it extra judicial, or has some legal body or government/intra-government body made an allowance?
Is the country of the dictator being assassinated hostile to the single country, or EU/NATO more generally? What's the general geopolitical situation? What's the European security situation?
What's the relationship between the country where the assassination took place and the country doing the assassinating?
There are NATO countries that are not in the EU (the US, Albania, Canada, Iceland, Montenegro, North Macedonia, Norway, Turkey, and now the UK), and there are also EU states that aren't members of NATO (Austria, Cyprus, Finland, Ireland, Malta, and Sweden). So, the question is VERY different if its a non-EU state performing a military strike within the EU.
Also, why a "military sniper rifle"? What do you mean by that term? Are you talking about something in a common NATO calibre (5.56x45, 7.62x51, .300 Win Mag, .338 Lapua Mag) or something in a non-NATO calibre (say, 7.62x54 or something exotic like 14.5x114) for plausible deniability reasons?