you can get the second master ball but,with cheat codes.I Play Pokemon emerald on PC so I can cheat it with Game Shark. here's the steps to cheat with INFINITE MASTER BALLS on game shark ON POKEMON EMERALD PC:
step 1:Open the gameboy advance on PC
step 2:start the game
step 3:click the "Cheats" button above the Gameboy Screen then,select cheat list button
step 4:click the "Gameshark..." button
step 5:then,type this code on the code collumn: 82005274 0001
and for the description collumn type:"Master Ball"(Description doesn't change the effect it's up to you about the description)
step 6:click "ok"
step 7:go to the pokemart on the Oldale City because i've try on another pokemart it doesn't work succesly only at Oldale city it Works
ANOTHER TIPS:you can also enable or disable the cheat by clicking on the checkmarked square and sometimes the cheat disappear in a minute after you used several times so make sure write the code and the description on the New Text Document (to create notes)
i hope this is helpful and works.