As far as Detective Pikachu's co-writers are concerned, the film is canon. The team took great care to make sure everything in this film fit in with the existing universe. Does that mean Ash could show up in a potential sequel? According to co-writer Banji Sammit in a ComicBook interview, it's not out of the realm of possibility.
“Obviously we can't speak for Legendary and the Pokemon Company. In our minds, this entire universe is fair game. When we were writing this movie, it was not only our goal but Rob [Letterman’s] goal, the studio's goal, everyone's goal, to really just focus on one movie. Tell a story. It has a beginning, a middle, and an end.”