No it was ported. And no it’s not a retail client since Legion is no longer retail since the advent of BFA.
Classic runs on the 7.3.5 client from the Legion era in order to be able to communicate with the battlenet network. But that has absolutely nothing to do with the fact that DM has been changed to prevent solo farming.
The changes to DM to prevent mages/hunters/locks from solo farming DM came prior to 1.12. Therefore, since Blizzard has given us the 1.12 version of everything else thus far, it’s clear that DM wasn’t going to be any different.
Anyone who actually thought otherwise is incredibly naive and deluding themselves. This falls under the #nochanges rule and has nothing to do with the Legion client that Classic runs on