I doubt Apple would offer this service. Assuming you specifically want a blade (M.2, NVMe, etc) SSD, even the authorised service providers would have to order an SSD from Apple at stock price (purchasing the part outright, without needing to send a defective part back as exchange), and Apple charges several thousands for even a 128GB SSD at stock price, let alone a 512GB. (Presumably to deter owners from purchasing service parts outright to perform upgrades.)
An AASP may be willing to install a third party drive if they could source a compatible one, or perhaps if you provided one, but if they did, chances are the installation will come with no warranties or guarantees (or a guarantee on workmanship, but not the disassembly a second time should the drive ever fail and need replacement).
A SATA SSD would likely be a different story, since it involves just swapping out the drive with industry standard, readily available parts, making it a lot more cost effective and more likely that an AASP would offer the service, and with some form of warranty. (However Apple themselves still won’t do this.) It does mean losing the internal HDD though since the SSD would be installed in place of it.