You can instead use template literals to form the HTML however you want, so that you're not limited by a third party API.
$('#action_existing_email').append(`
<option value=${templates[i].id} data-version=1>${templates[i].name}</option>`
);
This lets you see exactly what you're appending, without having to also understand the inner workings of an API.
And of course, you're then just a step away of going fully native.
var templates = [
{id:"foo", name:"FOO"}
];
var email = document.querySelector('#action_existing_email');
for (var i = 0; i < templates.length; i++) {
email.insertAdjacentHTML("beforeend",
`<option value=${templates[i].id} data-version=1>${templates[i].name}</option>`
);
}
console.log(email.options[0].dataset.version);
<select id=action_existing_email></select>
And shorten your code by using a for-of loop instead.
var templates = [
{id:"foo", name:"FOO"}
];
var email = document.querySelector('#action_existing_email');
for (const o of templates) {
email.insertAdjacentHTML("beforeend", `<option value=${o.id} data-version=1>${o.name}</option>`);
}
console.log(email.options[0].dataset.version);
<select id=action_existing_email></select>