Short answer: Yes you can. And here is why:

Normally, after calling the PackageShell executable, the package is just queued and the calling process immediately regains control. The package is then executed asynchronously by the service. This would not be practical while running inside a task sequence, because the execution would run parallel to the task sequence and there would be no way for the task sequence to wait for the package.

That's why in this scenario, the PackageShell executable actually waits for the PackageShell service to finish running. If the package requests a reboot, Packageshell does the necessary negotiation with the task sequence to perform the reboot as required.

Note: A task sequence does not support spontaneous, uncoordinated reboots from the package. While PackageShell can be told to tolerate this behavior, the task sequence is not as forgiving. If you run into a package that cannot suppress it's urge to reboot, you should use PackageShell with the parameter OSDQueue.