It was the Boro who went close early on but Joe Cuff could not connect when stretching to get his shot away.
Ashton took a 13th minute lead when John Pritchard curled his free-kick into the bottom corner of the Rangers net.
Just before the break it was Cuff who was again looking dangerous for the hosts as his half-volley hit the near side of the netting.
After the break Cuff was again looking dangerous and Joe Kenton found the marksman who lashed his effort over the bar.
Life was made harder for Rangers five minutes from time when Daniel Burns was sent off after colliding with Lewis Walters as he ran onto a through ball.
With seconds left of normal time Boro substitute Jamie Sleigh broke into the area, but his low driven shot was saved by the goalkeeper.
Deep into injury time Sleigh would have another opportunity after a defensive mistake but scuffed his shot and Ashton ran out victors.