A folded balun is effectively a shorted transmission line stub in parallel with the antenna.
simulate this circuit – Schematic created using CircuitLab
A quarter-wave transmission line transforms a load impedance to its dual. In this case the load is the short at the end, and the dual of a short is an open. So from the perspective of the feedpoint (represented by V1), the balun looks like an open circuit. An open circuit in parallel with the dipole looks like just the dipole. In other words, the balun has no effect on the feedpoint impedance. It serves only to provide a ground point where the coax shield can be connected, and it can do that because at the middle of the short everything is symmetrical.
Making the balun shorter or longer would have the effect of putting some reactance in parallel with the dipole. If the balun is shorter than a quarter wavelength, it will appear as an inductor. If it's longer, a capacitor. At any length it continues to function as a balun since the ground point is still symmetrical with respect to the rest of the antenna.
However, I can't say this is a very common thing to do. A half-wave dipole is already a good match to coax, so typically no additional matching is required.