Yes it’s possible, so long as it’s done right. The best thing is to first eliminate any existing population of mice, then properly seal up all the potential entry points internally and externally using strong metallic materials. If holes are sealed up before an existing mouse infestation is eliminated, they are quite likely to either make new holes or find a new way in. After all, these mice already know there’s a source of food nearby. But if they have all been eradicated first, then you seal up the holes, any new mice coming by in the future will only see a barrier, and will likely go somewhere else rather than make all the effort to gnaw their way in.