Note that the speed of sound is not a constant. It depends on temperature, humidity and more factors.

See - Speed of sound - Wikipedia

at 25C the SOS = 346

at 0C the SOS = 331

So measuring length with an ultrasound should at least be compensated for temperature.

That is a difference of 5% in speed so also 5% in measured length if a constant would be used.

As the length is squared in the formula for BMI this error effectively doubles.

**example**

length = 170 cm (25C) and mass = 75Kg

==> BMI = 75 /(1.7*1.7) = 25.95

length 170 cm would be measured as 170 + 170*0.05 ~ 178.5 (0C)*

==> BMI = 75 /(1.7851.785) = 23.54

difference in BMI = 2.4 ~ 10% error,

That said, a difference of 25C is a lot and used as an example, however temperature in the morning (minimum) and afternoon (maximum) can differ 5 - 15C quite easily. How big the error will be in your case is left as an exercise.