Nope, an iframe on an unrelated site is exactly what turns it into a third party cookie. (The user and the site they're visiting are the first two parties; the embedded site is the third party.)
Put another way, an ad iframe loading a tracking (identity) cookie is indistinguishable from a YouTube iframe loading a login (identity) cookie.
Put another way, an ad iframe loading a tracking (identity) cookie is indistinguishable from a YouTube iframe loading a login (identity) cookie.