The much-needed result lifted the Ryedale side five points clear of the relegation zone and into eighth place in the table.
The visitors made a good start and took the lead on eight minutes when skipper Sam Triffitt made a break for the line and touched down in the corner.
A Wheatley forward was yellow carded in front of his own posts and fly-half Charlie Ramsay increased the lead to 8-0 with a penalty.
After the break, Ramsay’s long range penalty effort fell short and, midway through the half, the hosts hit back with a converted try. With 15 minutes remaining, Wheatley conceded a penalty and Ramsay kicked his side into a winning four-point lead.
Meanwhile, Pocklington slithered to a 19-8 home defeat by Northern in a stop-start game in difficult conditions.
The Percy Road hosts had far more pressure and territory but gave away too many penalties.
Northern played a safety first game and defended as though their lives depended on it, including when they were reduced to 13 men by two yellow cards in the final quarter.
Northern opened with an early penalty before Pocklington hit back with a lineout catch and drive try from flanker Jack Holbrough.
The visitors continued to hit the target with two long range penalties, with Jack Fletcher kicking one for Pocklington in between, leaving Northern 9-8 ahead at the interval.
Northern made the most of a couple of rare second half attacks to kick a fourth penalty then score a converted try from a crosskick to the left wing.
Pocklington spent the last 20 minutes battering at Northern’s line without ever really looking like finding a way through.