M theory combines all string theories, however, some contain open strings but other do not. So what does M theory have to say about this?
M-theory is a theory that shows that the many different string theories people have come up with are connected by underlying dualities.
Each of the different theories it compromises are useful in different situations, and each of the different theories allow different types of strings. For example, type I theory includes both open and closed strings while types IIA and IIB only include closed strings. The point of M-theory is not that one form of string theory is right or wrong but that each is a special limiting case.
An analogy of this is light. It can be described as both a wave and a particle. Neither view is wrong, rather, using both views gives a more complete picture even though at first glance these seem contradictory. The same is true of M-theory - at first glance, all of the types of string theory seem radically different, but at a closer look at the mathematics, each are connected by dualities. More information about M-theory can be found here.
Reconciliation of string types
M-theory is based off of branes. A zero dimensional brane is representative of a point particle, and a one dimensional brane is representative of a string. Branes of higher dimensions are known as p-branes (if a two dimensional p-brane, p = 2). M-theory is also 11-dimensional (as opposed to string theory, which is 10 dimensional).
The fact that there is one more dimension in M-theory means that branes in M-theory appear one dimensional from the perspective of string theories, resulting in strings. Whether or not the strings appear as open or closed results from the mathematics of each of the individual theories, and how the reduction to one dimension is gone about.
Hope this helps!
(Thanks to CuriousOne for pointing out that I hadn't originally properly answered the question.)
First, what objects M-theory actually contains is not finally settled because we don't know the full extent of the conjectural theory that is M-theory.
Second, M-theory does so far not contain any strings - instead, it contains two-dimensional branes, the M2-branes, that reduce to the strings of the various string theories by having one of their two dimensions lie in the eleventh dimension of M-theory, so that they appear one-dimensional from the perspective of the ten-dimensional string theories. That sometimes these may manifest as open strings and other times not depends on the details of how the dimensional reduction to a particular string theory is achieved.