Josh Rock checked out of 144 to clinch an 8-7 victory for Northern Ireland against Latvia in the quarter-finals of the World Cup of Darts.