Catalysis of the reaction: RCO-SR' + H2O = RCOOH + HSR'. This reaction is the hydrolysis of a thiolester bond, an ester formed from a carboxylic acid and a thiol (i.e., RCO-SR'), such as that found in acetyl-coenzyme A.