TL;DR - YES; because Muggle trains from the same period would have had bathrooms, and the Hogwarts Express started as a Muggle one.
I preface this answer knowning full well the many in the SFF.SE community refer to the films as "nonsense", however off I go!
The train used in the films to portray the Hogwarts Express was the Olton Hall, no. 5972, 4-6-0 Hall class locomotive. This locomotive was built in 1937 (with the first Hall class being built in 1928). This would mean it was probably not the first engine to be used as the Express, but even with reading the Hogwarts Express piece on Pottermore, it is hard pin down an exact in-service date for the train. I would assume that coaches are from the same period (but the newer the coaches are the even likelier chance of them having a bathroom).
As toilets would probably be considered a necessity on trains traveling inter-city, bathrooms were installed on the passenger trains. Early trains used a hopper toilet, which would deposit the waste directly on the tracks.
Now the Hogwarts Express was a Muggle train (as we see in the above linked Pottermore article) and was modified before being put in magical service.
The Hogwarts Express underwent several magical modifications before the Ministry approved it for school use. Many pure-blood families were outraged at the idea of their children using Muggle transport, which they claimed was unsafe, insanitary and demeaning; however, as the Ministry decreed that students either rode the train or did not attend school, the objections were swiftly silenced.
One would surely hope that one of the "magical modifications" was not to remove sanitary facilities!