Whether template matching algorithms (and other image processing or computer vision techniques) are part of the AI field or not might be a little bit subjective. I don't know if there is a consensus on this topic. It probably depends on whether people consider these approaches intelligent or useful to create intelligent agents/systems, and that depends on the definition of intelligence. However, I think that most would agree that CV is fundamental to create AGI (e.g. most animals have a vision system).
Having said that, image processing techniques, including template matching, are still studied in the context of AI. For example, during my MSc in AI, I had a Computer Vision course, where we studied template matching, in addition to other more modern techniques (e.g. CNNs). If you look at a standard textbook on AI, e.g. AIMA, you will see that it contains sections on CV and image processing (chapter 24, 3rd edition). This book, which covers the history of AI, by Nils J. Nilsson (co-author of STRIPS and A*), mentions a few image processing techniques. So, CV and image processing have traditionally been studied in AI. Moreover, although one may think that IP algorithms are "not so intelligent", they are useful for CV, which is fundamental to create general AI systems. So, I think it's reasonable to consider both CV and IP techniques (whether they are rule-based or not) part of the AI field.