Seven straight points to open the quarter - including four from Rice and a Nate Holmes dunk - closed the gap to 14-13, and after a Marc Matalavag three-pointer, Rice reeled off seven in a row for a three-point lead the Trojans never relinquished.
Chambersburg (8-2, 4-2) expanded its edge to 31-21 early in the third quarter, but the Eagles refused to let the game get out of hand, scoring the final six points to pull within five entering the final eight minutes.
Buckets by Nathan Wingerd and Rickie Riddle to open the fourth period gave the Trojans a nine-point lead, but Cumberland Valley (5-6, 2-4) began bombing from beyond the arc, with Jon Butler drilling a pair of threes and Brandon Stanford adding one to close the gap to 50-48 with 79 seconds left.
After the Eagles' 6-foot-7 center Evan Walters fouled out with 62 seconds left, Bryan Zoeller missed the front end of the one-and-one, allowing Cumberland Valley an opportunity to take the lead with another 3. But Stanford's attempt bounced off the rim, and Zoeller was fouled again with 26 second remaining.
This time, however, the Chambersburg senior canned both shots providing the Trojans with the margin of victory.
"We had opportunities to go ahead," said Cumberland Valley coach Dave Bitting, and that's all you can ask for. We got a good look. We just couldn't put it down."
Rice canned 11 of his 17 field goal attempts for the game, while the rest of the Chambersburg team hit just nine of 29 tries.
Stanford finished with 16 points to pace the Eagles.
Chambersburg 52, Cumberland Valley 48
CUMBERLAND VALLEY (48)
Stoner 4, Butler 9, Philipkosky 6, Walters 4, Matalavag 3, Stanford 16, Mrkobrad 4. Springer 2, Totals 19 3-6 48.
CHAMBERSBURG (52)
Zoeller 4, Holmes 2, Rice 24, Clark 9, Riddle 2, Wingerd 7, Fisher 2, Leedy 2, Totals 20 10-16 52.
C. Valley1471215-48
Chambersburg6211114-52
Three-point goals - Cumberland Valley 6 (Mrkobrad, Stanford 2, Matalavag, Butler 2), Chambersburg 2 (Rice, Wingerd).