Let´s leave aside the various situations where someone has got away with it (whatever ´it´ is, be it poles in carry on, backpacks in the cabin, overstaying Schengen or camping wild in countries where it is frowned upon if not actually illegal) and coldly and without agenda consider your options, taking both risk and hazard into account and weighing up cost and benefit.
Firstly, assuming there will be nights when you cannot get into an albergue, how often will this occur? Once or at most twice would be a safe projection, so can you budget in one or two nights in a not necessarily expensive hotel? I think yes is the answer, and you may actually want to spend at least one night in a budget hotel, just for a relief from albergue dormitories. Secondly, if you find the albergue(s) to be full, what are your chances of finding a convenient place to camp? Remember that you will probably be in a town and not on a bike, so not great: the north of Portugal and Galicia are not in general wilderness areas and most square acreage is either cultivated or lived on. Thirdly, do you want to carry 2 or so kilograms (minimum for a 2 person tent) that you will almost certainly not need?
In other words, is a tent a good back up? Is it worth the effort? Will it justify its space and weight? I suspect a poll of forum members would vote a resounding ´no´, and I would be one of them.