Resolve internet address (IP) as running apps see them currently (vs. external name server)
It appears I made wrong assumptions about DNS caching. However, I was right on the /etc/hosts file, in that the host command ignores it, while apps running on the Mac do not ignore it by default.

So, I've made a very simple program that uses one of the Mac OS functions to resolve the host name into an IP address. This way, changes to the hosts file will be seen by this program, as they're seen by any other Mac app.

The program, including Xcode project, can be downloaded here.