The general rule is, you need to know the topology of your network to answer that question. There ARE no general rules, particularly in the realm of VMs - for which if you are on one VM instance and your SQL Server is on another VM instance IN THE SAME PHYSICAL VM HOST, there will be an IP address that has the appearance of being on a different machine. If the IP address that links to your SQL Server is 127.0.0.1 then you are on a locally hosted SQL Server connection because that is the internal loopback connection.
But the next question, is WHY? What would you do differently if your SQL server was on the same host or was NOT on the same host?