The mid-2015 Retina MacBook Pro comes only with "PCIe-based flash storage" (a quasi-proprietary card with flash chips soldered onto it, rather than a 2.5-inch form-factor device). Apple offers no HD-based models. So it appears your question is whether you can replace the 256 Gbyte flash card with a 512 Gbyte card. If you can find the higher-capacity card through eBay or a certified Apple repair facility, then yes, with the typical IFixIt methodology and a Pentalobe screwdriver, you can open the case and replace the flash card.
Make sure the flash card is for the right model; supposedly, it's up to twice as fast as the one in the previous model.
See: https://www.youtube.com/watch?v=gnT967BMpu0 for the location of the flash card at around 3:10.