The focal length is labeled on most lenses that I know but they are not 100% accurate. So if what the lens is labeled close enough then there is no need to measure. However, if you want more accuracy your method doesn't work because you don't know how far the front and rear nodal points are apart. When you measure d_subject it has to be measured from the front nodal point and the d_film has to be from the rear nodal point.
Correct in principle (I dd mention the front nodal point), but in practice this method does work to amateur accuracy. The reason is that the accuracy of this measurement is limited by how well you can measure:
1) the lens to subject distance, since you don't know the exact location of the front nodal point,
2) the extension, because this is a relatively small distance and I assume that the user is an amateur with say calipers or a micrometer, measuring the extension on a camera with a homemade fixture, not some kind of incredibly rigid and aligned optical bench.
If you set it up so the lens to subject distance is several times larger than the focal length, the error from not knowing the front nodal point is a small fraction of the subject distance, so it doesn't dominate the error budget.
I will give a worked out example, sorry for the tedium. Suppose you have a lens of focal length f=100mm (but you don't know this), and you focus it at a subject distance of d=1 meter measured. The extension from the lens equation is e=11.11 mm, measured. Most of us would probably only measure that to say the nearest 0.1 mm, an accuracy of 1% on e.
The lens equation 1/f = 1/d + 1/(f+e) can be rearranged into a quadratic: f^2 + e*f - e*d = 0. You can solve this with a calculator, or analytically:
f = (sqrt(e^2 +4*e*d) - e) / 2.
Suppose that the front nodal point is 10 mm different than where we thought it was. That means we would measure d=990mm or 1010mm, You can try plugging these numbers into the formula. You'll find that the inferred focal length would be 99.5mm or 100.5mm. A 1% error on subject distance leads to an 0.5% error on focal length (due to the prefactors in the formula and the square root).
It turns out that a 1% error on measuring the extension also leads to about an 0.5% error on the focal length. IMO, measuring the extension to 1% is difficult for an amateur without fabricating a jig.
It's possible to measure focal length much more accurately (I have a process lens that is marked with true focal length to 0.01 mm), but for that I think you'll need an optical bench and techniques that are beyond the scope of this discussion.