Although people preached it for many years, the one inch per gallon rule was never used for goldfish, oscars, discus, or marine fish, and is IMO, questionable for use with other freshwater tropical fish - particularly those with thick bodies or unique body shapes. Think about freshwater angelfish, whose bodies can grow up to around 6 to 8 inches at maturity, and who have long fins that require deep tanks. Using the rule, one could say their angel was suitably housed in a 10 gallon tank, and that would be ludicrous.
For very small fish - think neon tetras, and many inverts - the one gallon per inch rule can go by the wayside in a densely live planted tank, where the plants act as another natural filter, using ammonia and nitrate and giving back oxygen to the livestock.
Stocking a tank responsibly can't be limited to an inches rule. It relies upon careful research of the needs of the desired fish, and the habitat you're considering.