The use of 部 as a classifier in Mandarin So I’ve read that 部 is used for machines, films and literature. So does that mean I can use 部 for words like 书，词典, etc even though they usually go with 本？
The answer is sometimes. 

The reference to literature does not refer to physical books, but to works of literature. E.g. 


  BBC评选21世纪最伟大的12部小说
  
  (The) twelve greatest 21st century novels chosen by the BBC


The case with 字典 and 詞典 is different, as it can refer to the "work" or to the "book".


  中国第一部字典—说文解字
  
  The first (character) dictionary in China, the Shuowen Jiezi


Note that poetry collection 詩集 can also be used in this way, although individual poems not so.

書 wouldn't go with 部 - it doesn't refer to a work.