If the object is in a locked layer then you will not be able to rename it while it is locked - that is one of the reasons for locking a layer. You will have to unlock the layer first.
If you do not know how to do this then read the How_to_Use_LayersWiki document, specifically the Layers Tools in Surveyor Classic section. You will need to identify which layer the object is in but since it is a switch lever then it should be in the route-layer (that is where I would place it but it is entirely up to the route creator).
The locomotive would normally be in a session layer but again different creators have different ideas.