The reason why Mo Wuji was so emboldened was because he had exchanges with that ghost cultivator before and was therefore, aware of the opponent’s aura. If it was in the past where he had no sense of his aura before, he would not be able to find him even with the spiritual will. With the awareness of his aura, Mo Wuji was not afraid that he could not find the ghost cultivator.
Before entering the cabin, Mo Wuji had already scanned the entire ship using his spiritual will. After a while, Mo Wuji found out where the ghost cultivator was hiding at.