The ex-chancellor says Boris Johnson must "do the right thing", even if it means risking unpopularity.