Absolutely correct. If there is a DHCP server on your network and you've pinched (or are using for whatever reason) an IP address which has been assigned to someone else, then it's the name of that other person's machine that will show up in the terminal and anywhere else your machine name should appear.
Go to the network system preferences pane and set your IP address to DHCP (you might want to make a note of what it is before you change it)