Sure, but DC relative to what? Can't be ground since that connection isn't there, so that leaves neutral.
I've got half an alligator clip on my workbench, the other half disappeared when I connected it to the floating ground of a 5VDC system. It just so happens the ground was floating on top of 120VAC. The ATmega didn't care, it only ever saw 5V between its Vcc and Vee, however once I made the mistaken of connecting its "ground" to an actual ground sparks flew.
The DC side is fully isolated except through a capacitor that is there to reduce EMI interference and is specifically built to "fail safe", except for the cheapest no-name imported power supplies. (https://www.pcbaaa.com/y1-capacitors-function-application-an...)
That's not what the Y capacitor is doing here. All Y means is "high voltage withstand, will fail open, and we have receipts". Here, it's not line-to-ground, but primary-to-secondary.
You'd use X for L to L/N, Y is for N to Ground. Those isolated power supplies are definitley grounded, definitely not what Apple is using, and will probably shut themselves off if they lose their ground connection (or at least signal a fault to the operator)
You're also confusing the Y designation, which relates to the capacitor properties, to the application. Not all Y capacitors are used for line-to-ground applications. However any application where a failure to a closed state would result in a shock hazard must use Y-rated capacitors.
Neither is the output of an isolated power supply. That's the whole point. There is an enormous amount of resistance between the output side and the household wiring in the input side, just like the battery scenario. The difference between gigaohms (like you might see in between the windings of the SMPS transformer) and exaohms or whatever the airgap between the battery and the nearest outlet is is negligible for any practical purposes.
You may see AC leakage due to the capacitance between the windings and also that of the Y capacitor (this leakage is the source of the sensation in the article), but that's also tiny and it won't be blowing up any crocodile clips. If you did have that happen, your power supply wasn't isolated somehow.