For example if i gave a Spiritomb the Wonder Guard ability and it gets behind a sub, Will they be able to break the sub.
No, it won't be able to break the sub. >If this Pokémon has a Substitute, this ability will block moves as usual and any moves not blocked will react to the Substitute as usual. -Veekun