I need to replace bottom bracket on a 1991 Peugeot bicycle. What size should I measure when shopping for a new part? Size A is 140mm, which seems to be a rather strange size. Do I need to include the thread in the measurement?
The dimension you need to match is B in your photo. The length of a BB axle doesn't include the threaded ends.
You also need to measure the shell on your bike, though it's probably 68 mm.
See Sheldon Brown for more details. https://www.sheldonbrown.com/bbsize.html
So a fully specified cup-and-cone type BB would be something like 68x113, meaning it is intended for a bike with 68 mm shell and 113 mm long axle.
FYI: your replacement BB might have threaded holes in the ends of the axles, instead of male threads. (eg Shimano BB-UN26). You'll need bolts to go along with the new BB.