For example, if I bred a male Ingrain Trevant with a female Petilil, would the resulting Petilil have Ingrain? Or is it different?
The main purpose of breeding is usually to obtain a Pokémon that knows certain moves. If the male Pokémon knows moves that the baby Pokémon is capable of learning, it will know them when it hatches from the egg. This is a good way to reuse TMs that you taught a Pokémon and cannot re-obtain in another way like buying.
http://pokemondb.net/mechanics/breeding
So essentially yes. Your example would indeed work. Make sure that both Pokemon are in the same Egg Group, that the baby Pokemon being born is capable of learning said move and that the male parent has said move.