The answer, I believe, is contained in the latter passage: Forbid him not: for he that is not against us is for us. The Apostles complaint, according to one ancient interpretation, was based somewhat on envy:
What therefore is the meaning of his “not walking with us,” or what is
the force of the expression? Look then; for I will tell you as well as
I can.* The Saviour gave the holy Apostles authority over unclean
spirits, to cast them out, and to heal all disease and all sickness
among the people. And so they did; nor was the grace given them
ineffectual. For they returned with joy, saying; Lord, even the
devils are subject to us in Thy name [Luke 10:17]. They imagined, therefore, that
leave was given not to any one else but to themselves alone to be
invested with the authority which He had granted them. For this reason
they draw near, and want to learn, whether others also might exercise
it, even though they had not been appointed to the apostleship, nor
even to the office of teacher.
Cyril of Alexandria, A Commentary upon the Gospel according to St.
Luke, Sermon LV
The Lord, however, is able to see into the hearts of all and clearly understood that the one casting out demons in His name was, in fact, for Him and not against Him - even though he was not numbered as one of the Apostles.
"We must," however, "examine such things carefully," Cyril writes.
He says; for he who is not against you is on your part.” For on the
part of us who love Christ, are all who wish to act to His glory, and
are crowned by His grace. And this is a law to the churches continuing
even to this day. For we honour only those who lift up holy hands, and
purely and without fault or blame, in Christ’s name, rebuke unclean
spirits, and deliver multitudes from various diseases: for we know
that it is Christ Who worketh in them.
For there are verily men, who have not been counted worthy of Christ’s
grace, but make the reputation of being saints and honourable an
opportunity of gain. Of such one may say, that they are bold and
shameless hypocrites, who seize honours for themselves, even though
God has not called them thereto; they praise themselves, and imitate
the bold doings of the false prophets of old, of whom God said: I
have not sent the prophets, yet they ran: I have not spoken unto them,
yet they prophesied [Jeremiah 23:21]. And so too may He say of these,
I have not sanctified them, but they falsely assume the gift for
themselves: they have not been counted worthy of My grace, but
wickedly seize those things which I bestow on such alone as are worthy
to receive them.
Ibid.
The sons of Sceva belong to this latter class described by Cyril. Their motivation was entirely impure. John Chrysostom wrote (4th c.):
So entirely did they do all by way of trade! Observe: vagabond, or,
itinerant, Jewish exorcists. And to believe indeed, they had no mind;
but by that Name they wished to cast out the demons.
On the contrary, he writes, they had no faith whatsoever in Christ:
Then not the Name does anything, unless it be spoken with faith. (h)
See how they used their weapons against themselves! (j) So far were
they from thinking Jesus to be anything great: no, they must needs add
Paul, as thinking him to be something great. Here one may marvel how
it was that the demon did not coöperate with the imposture of the
exorcists, but on the contrary exposed them, and laid open their
stage-play.
Homily XLI on the Acts of the Apostles