What you don't want to do under all circumstances is make large enough changes to the outside diameter of the inflated tire that pedal/crank clearance with the ground becomes an issue. Geometry will suffer too, but as a rule of thumb, dealbreaking ground clearance problems will arise first. (It's my rule of thumb at least, having observed various wheel conversions where it seems fine at first and then you learn you get pedal strike in turns).
Generally speaking, if the brakes are a non-issue or a solved issue, i.e. a disk brake or switching to a different reach of rim brake, you can do whatever you want with swapping wheel sizes as long as the tire OD stays about the same while avoiding frame clearance issues with the tire. Lots of things about the bike and its ride qualities will change, but it will generally be rideable and functional. Note how 27.5+ bikes interchange with 29x2.3-2.4ish wheels, many people convert 700x23ish road bikes to 650b, downhillers running extra fat 24s in place of 26s, trials bikes with 19"x2.5" subbed in in back, etc. All the same principle.
There might be a better resource, but the lazy way of comparing tire ODs across different wheel and tire sizes is a computer circumference chart and dividing by pi. Tire deflection of course throws it all off a little, but meh.
In the case of a touring bike and trying to go from 700 to 26" (559), you'll usually find that you won't have enough fork/chainstay/seatstay clearance for the width of tires that get you into the right ballpark. There are exceptions, particularly with forks and seatstays because they're less inherently constrained in this way, but chainstays will usually be a pretty major limiting factor in back.
Applying your idea with 27.5"/650B wheels is more likely to work out.