Late wickets cost Pakistan as they dropped to 291-6 against Sri Lanka on day three of the third Test in Sharjah, a first innings deficit of 137 runs.