(Un)Fortunately, it is possible if there is a flaw in SIM card only and practically not possible even for the most. The reason is that SIM card stores security codes in internal EEPROM and never sends them back to the phone. It ack/nack requests only.
Of course, maybe developers of NOKIA 5110/6110 made some features like duplicating security codes in some kind of memory. In that case we can get those codes (at least PIN) for current SIM card in the phone. But at the begining we have to know how to read memories of the phone, I mean EEPROM and FLASH. I think it is possible (read memory) because FBUS works in any case, even without SIM card at all. Personally I am sure that this feature is present in the phone, because it is helpful for development and debugging.