Not the retail cartridge itself. What you're describing needs a flash card — a separate cartridge-shaped device that holds files on a microSD card, sold by shops such as R4DS.
One important distinction: flash cards are legitimate hardware, but the ROMs people put on them usually aren't. Copying games you don't own is piracy, and it's also the reason those cards are blocked by later Nintendo firmware and are hard to buy from mainstream retailers.