The U.K. government said Thursday that it was willing to take an equity stake of up to 25% to help rescue Tata Steel Ltd.’s U.K. operations, taking a step toward partially nationalizing the business decades after it was privatized by Margaret Thatcher.