Error correction for windowed reads from cyclic tapes
I don't know if this problem has been studied, and I bet there will be better solutions, but I'll suggest a scheme that I suspect might work well enough, even if it's not optimal.
Naive approach: brute-force decoding
I would bet that any erasure code would work, if combined with brute-force decoding.  For decoding, I am imagining that a naive algorithm is to enumerate all possibilities for what the starting point was, decode under that assumption, and check whether it leads to a correct reconstruction that is consistent with that assumption (i.e., all symbols you read match).  Heuristically, I would expect that typically there will be only one decoding that is consistent with the observed data.  This might be a bit slow -- decoding might take $O(MN)$ time for many codes, because of need to try all $O(N)$ possibilities for the starting point -- but if that's acceptable, it should be something that's easy to implement.
For instance, you could use a Reed-Solomon code.  To encode a message, you treat it as a polynomial $p(x)$ of degree less than $M$ (say, of degree $M-1-\lg N$) over some finite field (i.e., the bits of the message determine the coefficients of $p(x)$).  Then, you write $p(\alpha^i)$ in the $i$th position on the tape, for $i=1,2,\dots,N$ (where $\alpha$ is a fixed element of the finite field).  For each guess at where the read symbols might have started from, you can decode using polynomial interpolation.  The entire procedure will take $O(MN \log M)$ time, to decode.
Faster approach: rolling hash
Here is an alternative that should be me faster: it runs in linear time.  I expect it will be close to optimal.
Encoding algorithm.  Let $C$ be a small constant, to be chosen later.  Let's suppose we have a message that is $M-C$ symbols long.  We'll compute a Rabin-Karp rolling hash of the message, a hash that is $C$ symbols long, and append it to the message.  Then, we'll repeat these $M$ symbols cyclically, to get a $N$-symbol word.  That will be the codeword that is the encoding of the message.  Encoding can be done in $O(N)$ time.
Decoding algorithm. Given an observed value $Y$ with $M$ symbols, we'll try all $M$ possibilities for cyclically shifting it to see which is correct.  We can recognize when we have the correct shift because the last $C$ symbols will be the valid hash of the first $M-C$ symbols.
Naively, this decoding procedure would take $O(M^2)$ time.  However, we can use the properties of the Rabin-Karp rolling hash to make decoding much more efficient.  Let $H(x)$ denote the Rabin-Karp hash of $x$.  Note that we can apply the Rabin-Karp rolling hash to $Y$ and learn $H(Y_{1..i})$ for each $i$; we can compute all $M$ of these hashes in $O(M)$ time.
From $H(Y_{1..i-1})$ and $H(Y_{1..j})$, we can compute $H(Y_{i..j})$ in $O(1)$ time. Also, given two hashes $H(x_1)$ and $H(x_2)$, we can compute the hash $H(x_1||x_2)$ of the concatenation of $x_1$ and $x_2$ in $O(1)$ time.  Thus, for any candidate cyclical shift of $Y$, we can compute the hash of the first $M-C$ symbols in $O(1)$ time, given the precomputed values $H(Y_{1..i})$, and thereby check whether this candidate shift is correct (by comparing that hash to the last $C$ symbols of the shifted value).  This decoding algorithm does an initial $O(M)$-time precomputation to compute all of the $H(Y_{1..i})$ values, and then checks $M$ candidates, each of which takes $O(1)$ time, for a total decoding time of $O(M)$.
Choosing parameters. Lastly, I need to describe how we choose the constant $C$.  I suggest choosing it so that it is very unlikely that any incorrect decoding will survive the hash-value check.  Suppose each symbol is $b$ bits long.  Then, a $C$-symbol hash is $bC$ bits long, and each incorrect candidate shift has a $1/2^{bC}$ chance of being wrongly accepted (by having the hash value match just by sheer chance).  We test $M$ candidate shifts, so there is about a $M/2^{bC}$ chance that one of these is wrongly accepted.  We might set as a goal that this chance should be at most $1/2^{50}$ (so that the chance of wrongly accepting an invalid message is less than the chance of being struck by lightning multiple times, and less than the chance of a cosmic ray hitting your computer and causing a bitflip error, i.e., negligibly small).  This means we need $M/2^{bC} \le 1/2^{50}$, so it suffices to take $C = \lceil(50 + \lg M)/b \rceil$.