For a normal ruler, any accuracy or inaccuracy is just inherited from the machine that made the ruler. For a plastic ruler, that would be the injection molding machine that made it, though in that case the person designing the mold needs to account for the plastic shrinking as it cools. A wooden ruler might also shrink and expand with humidity. Even metal will shrink and expand with temperature, so length standards also specify temperature.
If you’re using a ruler, I’d be confident the measurement is accurate to within 1mm or 1/16″. If you’re using calipers, maybe about 0.1mm or about 4/1000 of an inch. If you need better than that, you use a micrometer. If you need better than THAT you use gauge blocks, a surface plate, and a test indicator.
For more accurate measurement tools, there’s a chain of comparisons called traceability. At the very foundation you look at how length is defined in the first place, and it’s defined by fixing the speed of light. What this means is you can use laser interferometry to measure your physical standards extremely accurately.
Latest Answers