Boyd Rankin boosted champions Warwickshire's hopes of beating Surrey with three wickets in an over on the third day at Guildford.