Using next-to-leading order (NLO) perturbative QCD, we calculate the diffractive contribution to inclusive dijet photoproduction in Pb-Pb ultraperipheral collisions (UPCs) at the LHC and find that it does not exceed 5% in small-$x_A$ bins in the ATLAS kinematics at $sqrt{s_{NN}}=5.02$ TeV. Its smallness is a result of the restricted kinematics ($p_{T1} > 20$ GeV and $x_A > 0.001$) and the large nuclear suppression of nuclear diffractive parton distribution functions predicted in the leading twist model of nuclear shadowing. Thus, in an analysis of new constraints on nuclear parton distribution functions (PDFs) at small $x_A$ using the LHC data on inclusive dijet photoproduction in heavy-ion UPCs, one can safely neglect the correction factor due to the excluded diffractive contribution. At the same time, applying our framework to proton-proton UPCs at $sqrt{s_{NN}}=13$ TeV, we find that the ratio of the diffractive and inclusive cross sections of dijet photoproduction can reach $20-25$% for $x_p sim 5 times 10^{-5}$.