ISRC codes, yes. UPC codes, no.
DistroKid has been appointed by the US ISRC Agency to assign ISRCs, and will automatically generate new DistroKid ISRC codes for every song you upload. It's free and automatic.
But if you want to specify your own ISRC codes for any reason, that's easy to do: Make sure you're subscribed to DistroKid's "Musician Plus" or "Label" account. Then click "already got an ISRC code?" on DistroKid's upload form.
There is no way to specify a custom UPC code.
If you want to apply for a UPC issued by GS1, please contact your local GS1 office here.
If you prefer to purchase your own ISRCs, visit https://www.usisrc.org/