If an invention is in use in a foreign country, but it is not patented in that country (or any other countries), and it is not the subject of a printed publication anywhere, could that invention be patented in the U.S.A.?
In a direct answer to the question, absolutely yes (the title is worded opposite to the question so the answer to the tile is no), up until March 16th of 2013 when the provisions of the AIA kicked in. The old law said you couldn't get a patent if it was patented or published anywhere in the world. Or if it was known or used by others in this country - 35 USC sec 102(a). That all changed with the AIA so that the location of the known or used is worldwide. I think it was originally USA specific due to the difficulty of proving or disproving that something was known or used out of the country. A publication is in black and white.
That does not mean one can steal an idea you learn on a foreign trip or apply for a patent when you know you are not the first and true inventor, inventors sign an oath to that effect.
It's a tricky question. In past there were cases when a patent was awarded despite the fact that the invention was demonstrated or even standardized in other countries.
One notable example is MagSafe patent (US-7311526) that Apple filed in 2005 and was awarded in 2007. However, not only were magnetic power cords used before that but they were even standardized in one case. In 2001 Underwriters Laboratories designed a standard for safe operation of deep fryers in Japan that required kitchen appliance manufacturers to use magnetic power cords in their consumer products.
The new cord is connected to the fryer by a magnet. If the cord is pulled, it will break away from the fryer, preventing it from tipping over and reducing the chances of spilling hot grease.
However, despite the fact that these power cords existed and were known in the industry the patent was awarded to Apple and surprisingly no other consumer electronics manufacturer questioned their claims.
It seems like the Underwriters Laboratories doesn't have that standard published on their website but this work is mentioned in the bio of one of its founders - James Beyreis