It would still be legal, if you made the 26" requirement.
....but I don't think you would.
With the 18.5" barrel, you should come in at about 24.6" with the pistol grip.
That's assuming the pistol grip will even attach to the rifle frame. Most manufacturers use methods to prevent rifles that share lineage with a handgun from having parts easily swapped out with the handgun version.
"Such is the strange way that man works -- first he virtually destroys a species and then does everything in his power to restore it."