Since most carbines when through at least one rebuild, once the M2 carbine went into production, there would a be reasonable chance some armorer would put an M2 mag release on an M1 carbine during a rebuild.
As folks have said, go ahead and replace the mag release but keep the original for the next owner.
Just a note on matching numbers. Carbines and Garands do not have parts matched marked with the receiver's serial number. It is one of the beauties of both rifles, except for one or two parts such as the barrel to frame fit and checking the headspace on the bolt, most of the parts on the rifles are pretty much drop in. There is no need to fit them to the rifle hence there is not need to match number the parts.
The carbine and Garand purists have ways to determine if a rifle has parts that were manufactured at the same time as the receiver. At least with the Garand, the parts have a drawing number and revision number on the parts which indicate when the parts were manufactured within a particular range. But even so, "correct" Garands have been found with parts outside the accepted time ranges.
There are pictures from WWII showing an in theater armory depot with stacks and pails of Garand parts scattered around the armorer. No way they attempted to keep parts for a particular rifle separate from another rifle.
I do not think carbine parts have the drawing numbers on the parts, but I'll admit I've slept a bit since I last disassembled one of my carbines. But the look of the parts have an indication of who made the part and approximately when. For instance, there is two different style bolts used in the carbines.
Most WWII carbines were originally made without a bayonet mount. By late in the war, a bayonet mount had been manufactured and as carbines were rebuilt, the bayonet mount was installed. Carbines without the bayonet mount are now relatively rare compared to the total production of carbines.
One of the pursuits of some Garand collectors is to make their Garand "correct". They scour the parts market looking for parts that were made at the correct time as the receiver.
Personally, I like the mixmasters, they have character.