[Edited to include some 8-unit variations and a new 7-unit setting]
[...and to report on another 7-unit setting by N.Predrag, and 6-unit variations by H.Reddmann]
Ed Dean already gave a good example (the White bishop can go to d7 and e8 too but it doesn't change the outcome). I follow up only to point out some variations, all with a much smaller supporting cast of pieces, and two [Edit: now three] with an extra feature of possible interest.
I already showed in a comment how to do without most of the idle pawns and rooks in Dean's position; here's a version that saves two more pawns, reducing the number of units on the board to 10:
Position A: White Kg1, Bd1, Nc4, pawns a6,d6; Black Ka8, Bb1, Bb8, pawns g2,g3;
Position B = Position A after 1...Ba7+ 2 Nb6+ Kb8.
The only irreversible moves from Position B are with the light-squared bishops, which cannot reach the dark-square diagonal g1-a7 to unpin the knight and unlock the king's cage.
Here's a version that uses one fewer unit by replacing the pinning bishop with a rook:
Position A: White Kh5, Nd7, pawns g4,f6; Black Kh7, Rh8, Bb7, pawns g5,f7;
Position B = Position A after 1 Nf8+ Kg8+ 2 Nh7.
This time the White king supplies White's ensuing moves without stepping off the pin-line, so only the Black bishop is needed.
Now consider what would happen if the Black bishop were a knight. Then we could return from B to A by getting the knight to h6, e.g. 2...Nd6 3 Kh6 Nf5+ 4 Kh5 Nh6! 5 Nf8! Rh7! etc. (6 Nd7 Rh8 followed by Kh7, Nf5, Nd6, Nb7); but this works only because b7 is a light square: if we put this knight on a dark square there would be a parity obstruction! Thus (with a dark-squared Black knight) we obtain another example with 9 units.
[EDIT: the White pawn on f6 is not necessary, because if Black ever plays Kg7 then White is stalemated. Thus either the bishop or the knight version works with only 8 units.]
Here's another way, with a rook as the pinned piece:
Position A = White Kf1, Rd1, Bh2, pawn g3; Black Kc4, Ba6, pawns f2,f3,b7;
Position B = Position A after 1 Rd5 Kb3(b4)+ 2 Rb5+ Ka3.
Now the Black king is restricted to {a1,a2,a3,a4} and the White bishop to {g1,h2}. The g3 pawn is needed, even though the White bishop cannot reach the f1-a6 diagonal, to avoid things like 3 Bd6+ Ka2 4 Bb4 Kb3 5 Bd6+ Kc4 6 Rb1 etc.
Likewise with a White knight instead of the bishop:
Position A = White Ke1, Rf2, Nb1, pawn f4; Black Kg3, Bh4, pawns e2,e3,g5; White to move:
Position B = Position A after 1 Rg2+ Kh3+ 2 Rg3+ Kh2.
Again this works only because it's White's turn: moving the Black king to h1 in Position B would be a parity pooper. I initially had this without the f4-pawn; do you see why that 8-unit attempt fails — that is, can you get from B back to A after removing the White pawn from both positions?
[Edit: However, it does work without the f4-pawn if we replace the White Nb1 by a white bishop moving on squares of either color: a dark-squared one could never reach f2, and a light-squared one could play to g2 to allow ...Kg1 but it doesn't matter because the Black king may never play to f2 anyway. So that's another 8-unit construction.]
There's a related genre of unorthodox chess problems called "orthoreconstructions" that features more complicated examples involving parity.
Finally, a new setting using a White queen to reduce the total count units on the board to 7:
Position A: White Ka1, Qa3, pawn b3; Black Kc3, Bd4, pawns a2, b5; Position B = Position A with Qa3, Kc3 switched and White to move, as after 1 Qb2(c1)+ Kb4(+) 2 Qc3+ Ka3:
(source: janko.at)
$\phantom{\Longrightarrow\Longrightarrow}$
(source: janko.at)
The only reversible continuation from Position B is 3 Qb2+ Kb4 4 Qc3+ Ka3 etc.
FURTHER UPDATE Meanwhile Hauke Reddmann reports (in a comment to Ed's initial post) that Nikolas Predrag, on the MatPlus forum, constructed in at most 3 hours an alternative 7-unit setting, with just kings and pawns: A = White Kc7, pawns c5,d6,d7 vs. Black Ka8, pawns a5,c6; B = after 1 Kb6, with 1...Kb8 2 Ka6 Ka8 3 Kb6 (B again) etc. as the only reversible continuation. H.Reddmann later found that I shouldn't have stopped at 7: the scheme with a pinned checking queen has several variations with only 6 units, which need not include even one pawn. Thus Position B can be White Kf1 Qf2, Black Kh1 Re4 Rf4 Nh3, with White to move (1 Qf3+ Kh2 2 Qf2+ Kh1 etc.), and Position A can be almost any one-move retraction from B.