Let's look at the definition:
An inertial frame of reference in classical physics and special relativity possesses the property that in this frame of reference a body with zero net force acting upon it does not accelerate; that is, such a body is at rest or moving at a constant speed in a straight line. An inertial frame of reference can be defined in analytical terms as a frame of reference that describes time and space homogeneously, isotropically, and in a time-independent manner. Conceptually, the physics of a system in an inertial frame have no causes external to the system
The crucial word is conceptually. It carries after it the whole concept of measurement, and physics is about experiments and measurements, and the theories and definitions are tools to describe and then mathematically model the observations, so that one gets a predictive theory.
Measurements come with experimental errors, and thus how complicated the theoretical model one is using depends on these errors. One takes the simplest assumptions, it makes no sense to use the galactic reference frame ( we are also rotating around the galactic center) when measuring a force on bodies on earth, and also the measurement will depend on our measuring instruments.
For example, for usual engineering uses we accept that the earth is flat, the errors of the curvature of the earth to the details of a building are so small that they are within measurement errors.
We accept that the earth is rotating, a non inertial frame, when calculating the coriolis force and the distances planes travel etc, because there the force from the rotation effect is larger than the instrument errors.
So it depends on what you are measuring, whether you can use/assume that the earth is in an inertial frame within measurement errors or not. It depends on the problem at hand.