The short answer: Yes

What Does the Air Filter Do?

The air filter cleans incoming air that will be mixed with the fuel and prevents dirt from building up on sensors.

Why Would the Engine Light Come On?

If the air filter is the wrong size, unfiltered air can slip around the opening. Dirt can build up on the mass airflow sensor. With the sensor clogged, the engine can no longer determine how much fuel to mix for proper combustion. This will trigger the engine light.