Is it possible to place a railway that goes east to west in minecraft?
Unless for some reason you need a single track. Place a second track to the east or west of the first one it should reorient east-west. https://minecraft.gamepedia.com/Rail
As of 1.15, rails now place in the direction you are looking.