Each species has three "ability slots" -- two for normal abilities, and one for hidden abilities. Each individual Pokemon you have is assigned one of these three ability slots. Using your example, Excadrill with Sand Force would have ability slot 2 (for normal abilities). Ability slots are numbered in PokemonDB's Pokedex.
When a Pokemon evolves, its ability slot cannot change. However, if the ability associated with its slot is different for its evolved form, then yes, it is possible for the Pokemon to change ability when evolving.
An example of a Pokemon that can change ability when evolving is Magikarp. Magikarp has Swift Swim in slot 1, but Gyarados has Intimidate in slot 1. So, all Magikarp with Swift Swim will evolve into Gyarados with Intimidate. In your example, Sand Force exists in slot 2 for both Drilbur and Excadrill, and Mold Breaker is in the HA slot for both Drilbur and Excadrill. So, Drilbur with Mold Breaker will never evolve into Excadrill with Sand Force.