A historic former place of worship can be converted into a gym and library after plans were agreed with the council.