The possibility of an accelerating cosmology in Rastall's theory