What is the function of 贴 in 四贴袋？
贴 in 四贴袋 is not measure word but adjective, meaning pasted. It describes the appearance of the pocket is like it's pasted/patched on the suit.
When 贴袋 is used as noun, you can use any measure word that's applicable to a pocket. E.g.

这件衣服上有四个贴袋。

But in your example, 四贴袋 is noun-as-adjective (数词+名词短语做定语), in which situation there should not be measure words in between, and strictly speaking, 四 here is not nominal number four but tuple nomenclature quad. Some other examples:

三轮车 three-wheel(ed) vehicle
多功能全自动洗衣机 multi-function automatic washing machine
四贴袋男用套装 four/quad-patch pocket men's suit