The batteries are compatible as shown here at Parts-People. However if you are installing a non-Dell battery it may not be recognized by the system which may affect charging. Generally only Dell OEM batteries are recommended for best performance.
I have a 2015 model of the Latitude 7250, the old battery is being replaced. I am going to use a E7240 battery with 45 Wh which is more than the original 39 Wh. Just making sure they are compatible, are they?   Also the new battery is lighter. Looks the same for fitting. The brand is not mentioned.
Latitude E7250 new battery compatibility?