It depends upon your intent and how you do it.
First let’s look USGA Rule 7-2 (Practice -> During Round):
stroke during play of a hole.
Between the play of two holes a player must not make a practice stroke, except that he may practice putting or chipping on or near:
a. the putting green of the hole last played,
b. any practice putting green, or
c. the teeing ground of the next hole to be played in the round, provided a practice stroke is not made from a hazard and does not unduly delay play (Rule 6-7).
Strokes made in continuing the play of a hole, the result of which has been decided, are not practice strokes.
PENALTY FOR BREACH OF RULE 7-2:Match play – Loss of hole; Stroke play – Two strokes.
In the event of a breach between the play of two holes, the penalty applies to the next hole.
…and decision 7-2/5 specifically addresses this situation:
Hitting Practice Range Ball Back to RangeQ.During play of a hole, a player saw some balls from the adjoining practice range lying on the course and flicked one back to the range with his club. Is there a penalty under Rule 7-2?
A.In some circumstances the hitting of a practice range ball back towards the range during the play of a hole would be a breach of Rule 7-2, but the casual flicking of a range ball, apparently only for the purpose of tidying up the course, is not a breach.
I recommend leaving those wayward range balls alone or treat them as you would any other moveable obstruction. Taking a stroke at them might be construed as practice regardless of your intent — don’t risk the penalty.