Yes. Direct Hit can follow up hits that are assigned by those abilities.
The official FAQ confirms that Direct Hit is not limited to combat-roll hits. It can be played when a ship uses Sustain Damage to cancel a hit produced by one of your abilities, including Ambush, Dimensional Splicer, and Devotion.
Official FAQ (LRR v2.0). Use the cited official wording or card printing; do not mix replacement / Omega / expansion versions.