Taking an elbow in the face in the final minutes didn’t bother Chasson Randle, who called it “part of the game.”

He added five points after the blow and finished with a career-high 35 points to lead Stanford to a foul-laden 74-65 win over Rhode Island at Maples Pavilion on Sunday night.

For many weeks, the senior guard has been in a bit of a scoring slump, reaching the 20-point mark just once in 12 games after doing it in eight of the previous nine games. Now, he’s only 27 points from becoming Stanford’s all-time leading scorer.

At 2,310 points, he could pass not only runner-up Adam Keefe (2,319) but also career leader Todd Lichti (2,336) with another big game in an NIT quarterfinal. That will come at 6 p.m. Tuesday when the Cardinal (21-13) play Vanderbilt (21-13) at Maples.

“I just want to keep winning,” Randle said. “It would be a great achievement to be the all-time leading scorer, but I just want to go out on the right note with this team. We didn’t achieve what we want to, making the NCAA Tournament, but we were granted an opportunity here in the NIT.”

Stanford, 15-3 at home this season, had a huge advantage at the foul line. The Rams (23-10) were called for 35 fouls to 21 for Stanford. The Cardinal went to the foul line 49 times, making 36 of them. URI was 12 for 21.

Rams head coach Dan Hurley wasn’t happy with the discrepancy. “I was so proud of the way we fought, but I thought we deserved better than what we got there” from the officials, he said.

“Obviously, without that differential, we would have had a great chance to win the game. Forty-nine free throws is the most I’ve seen. That’s an impossible situation to overcome on the road.”

Two sophomore left-handers led URI. Guard E.C. Matthews scored 23 points, and 6-foot-7 forward Hassan Martin had 16 points, eight rebounds and four blocks.

“They were one of the toughest teams we’ve faced as far as the level of physicality they bring to the games,” Stanford head coach Johnny Dawkins said. “For 40 minutes, we matched their physicality and were able to still play our game. Of course, Chasson had a spectacular night, and that helps.”

Anthony Brown scored 16 points for Stanford, and Stefan Nastic added seven points and 11 rebounds.

With just less than five minutes left, the Rams’ Jarvis Garrett was called for an intentional foul when he elbowed Randle in the face. Randle hit both free throws, and, with Stanford retaining possession, he soon was fouled again. He sank one of two for a 61-51 lead. The Rams got no closer than eight points the rest of the way.

Dawkins said he saw something in this team that he saw in Stanford’s 2012 NIT champions. “They’re not ready for this season to be over,” he said.

Tom FitzGerald is a San Francisco Chronicle staff writer. E-mail: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald