parfor already has the innate ability to run without Parallel Computing Toolbox being present, and it should automatically handle the case where a PCT license is not available. Presuming the user settings are in the default state (i.e. a parallel pool is automatically created when encountering a parfor), then if the license checkout fails, parfor should already degrade gracefully. Here's what I tried:
>> parfor i = 1, end
>> parpool('local', 2)
Starting parallel pool (parpool) using the 'local' profile ...
License checkout failed.
License Manager Error -5
Cannot find a license for Distrib_Computing_Toolbox.
Troubleshoot this issue by visiting:
License path: /home/eellis/.matlab/R2018b_licenses/license_uk-eellis-deb9-64_40447121_R2018b.lic:/local-ssd2/MATLAB/R2018b/licenses/license.dat:/local-ssd2/MATLAB/R2018b/licenses/*.lic
Licensing error: -5,0.
Error using parpool (line 113)
Unable to checkout a license for the Parallel Computing Toolbox.
So, I believe that if your code has only calls to parfor and not parpool, then it should work correctly. Please give more details if this isn't what you're seeing.