You should really run a few checks, just to make sure that someone hasn't done something really weird like put a 125 engine in a 250 frame. If it is the wrong size engine then it is probably the wrong year as well.
To confirm what DMV told you look at the VIN #.
the first three letters identify the Manufacturer: J for Japan, Y for Yamaha, (not sure of third digit)
The next 5 digits (digits 4 through 8) are the "Vehicle Descriptor" section. The second of this group (5th overall) should be a letter indicating engine size: F= 100-124, G=125-149, H = 150- 199, (skip I), J = 200-249, etc.
Once you establish what the VIN says it should be then I would recommend comparing what the engine looks like to the Yamaha parts diagrams. You can go online to a number of different locations to get access to parts diagrams directly from Yamaha. Do a search on Yamaha OEM parts and you will find several. Note that they all reference the Yamaha system, they are not implementing this function themselves. You ented the the vehilce "line" (motorcyle), Year, model (YZ250) and then go look at some distinctive engine part that looks different between a 125 and a 250.
Rod
If your engine doesn't match either one then change years and look again.