A former library in Abertillery is to be transformed into office space after a planning application was given full approval.