That’s quite a common situation in older houses, especially with steel gas pipes from that era.
If the pipe is no longer in use, removal is usually the best long-term option, but it’s important to make sure it’s completely disconnected and safe before doing anything. In some cases, people leave...