A town’s oldest building could be given a new lease of life after the council secured more than £1 million in government funding.