Cops can only operate within their own borders (like a NY cop cannot enforce the law in Canada) unless they’re granted special permission from Ottawa to the White House on catching high profile fugitives, even then: their powers are limited in order not to violate their sovereignty. Would their badge hold any weight while they are overseas (who have their own judiciary)?
That’s only speaking on official terms: but, what happens if an American on vacation (like off duty sheriff) witnesses or encounters criminal activity while they’re abroad? Are they allowed to detain that person or do they have to eventually turn them over to local authorities? For instance, they could flex a LAPD badge in Japan, but is that valid or considered null?


Usually those requests go through the state department and if the us has an extradition treaty, the extradition is handled by the country they’re residing in.
If there is none, it’s more murky and usually handled case by case. (Or just ignored.)
If we do the asshole thing and ignore all that, it’s going to be the military, not cops. (See Maduro’s “arrest”)
Generally, cops only have authority within specific jurisdictions, sheriff’s the counties they work in and cops the cities, though if there’s a justification, they can go outside that, but it’s kinda frowned on without that justification.
Cops travelling, like on vacation have no special powers. Their authority comes from the states they work in, not even the us federal government, and not from just being cops. Few countries would allow foreign cops to just operate like that. (Actually probably none.)