If I were to say, "I hope that this will work", would it also be correct to say, "I hope this will work"? Would both be grammatically correct?
Both are correct. In this case 'that' isn't being used demonstratively. Here the object of this sentence is a 'that-clause', where 'that' helps connect the (in this case transitive) verb with its object, "you wouldn't do that". If the sentence was much longer then using 'that' would help indicate the object.