As you say, Japanese word, トイレ is a loaned word from English, toilet, which according to Concise Oxford English Dictionary (10th Edition) means “a large bowl for urinating or defecating into, typically plumed into a sewage system. But トイレ is equivalent to original Japanese word, 便所 which means a room containing a toilet or toilets. We call “a large bowl for urinating or defecating into, a 便器.
Although we have 便所、お手洗い、洗面所、化粧室 as its alternatives, it’s lucky that we Japanese can do with ”トイレ” for complex mix of English “Washroom”, “restroom”, “bathroom”, “lavatory”, "privy," “toilet,” “toilet room,” "the gents", "Saint john’s," "john", or "jack" as shown in the following question posted in SE English language & Usage site:
“Washroom”, “restroom”, “bathroom”, “lavatory”, “toilet” or “toilet
I've always been confused by the terms washroom, restroom, bathroom,
lavatory, toilet and toilet room. My impression is that Canadians
would rather say washroom while Americans would probably say bathroom
or Saint John's in the same situation. Which do you usually use?
Please specify the difference if you use more than two from those six
with different meanings, and also where you are from.