Tex, the way I read your question, your are equating "gauge" with "scale". It's a very common question, since even the manufacturers don't separate the two terms very well.
Gauge is the distance between the inside running rails. For the real (prototype) railroads, the usual gauge is 56.5". For both O-gauge and O-27 gauge, the distance is 1-1/4". The ratio of O-gauge to the prototype gauge is approximately 1:48.
This ratio is O-scale. Although the ratio isn't quite exact, it allows us to equate 1/4" in O-scale to 1' in the real world. A forty-foot boxcar should be 40/4, or 10" long in O-scale. A six-foot man would be 6/4, or 1.5" tall in O-scale. In order for anything to be O-scale, all its dimensions should be 1/48th as big as the prototype.
BTW, Lionel O-gauge track is 11/16" high (2.75-foot prototype), and Lionel O-27 track is 7/16" high (1.75-foot prototype). Prototype track isn't that high; that's why we use the term "hi-rail" to represent scale modeling when just about everything except the track is 1:48 scale height.
O-scale trains (Lionel's "Standard O", MTH's "Premier") and structures labeled "O-scale" generally conform to the 1:48 ratio.
O-27 trains (Lionel "Traditional", MTH "Railking") do not conform to any scale - they could be smaller, the same size, or even larger than O-scale. They are designed to negotiate smaller curves, so often their length is shorter and the height and width may have been changed to make them "look right" (called "selective compression"). OTOH, the engines can't be too small or the motor and circuitry would not fit inside.
In order to determine if an item is O-scale, you would have to determine what its prototype is and then determine whether or not all the model's dimensions (at least length, height, and width) conform with the 1:48 standard. This can be difficult for trains if you don't have reference books giving the prototype measurements. It's a little bit easier for structures, since they don't necessarily have a prototype counterpart. However, the doors would need to be of the proper height and width, and you wouldn't want to model a WallyWorldSuperCenter in a 4" x6" space (!).
One final note - there is a modeling technique called "forced perspective" in which smaller-than-scale structures (or trains) are located farther away from the viewer than the larger structures and trains. The technique tricks the eye into thinking the layout has greater depth. Lionel Trains, Inc. runs an S-scale (1:64) train in the middle of their showroom layout. Dennis Brennan has an excellent article in the March issue of Classic Toy Trains that shows how HO-scale (1:87) structures can be used in the background to produce this effect.