The attack on Ukraine’s rail network, which connects the country to the West, was a jab at Europe, officials said.