No, you cannot alter IMEI and international mobile device network identifiers even if the device is legally yours. There's safety and security reasons behind it and much more that I rather not get into cause you dont seem to get it or dont want to get it.
About your other questions or remarks not sure, research them and find out the laws yourself.
No, I'm curious. Can you explain why it's illegal please? Could it be used to spend money on someone else's sim card? are imei numbers linked to sim cards or to phones?