The practical answer is yes. The more nuanced answer is that for a given gear ratio, the closer the cog and the chainring are in size, the more extra chain length you'll have if you keep the same chain, but it is a very small amount. For any kind of bike with horizontal dropouts or track ends, you can just slide the rear wheel to adjust.
Why does having a chainring and cog closer in size give you more chain length? Because the chain travels along a hypotenuse that gets steeper as the chainring gets bigger and the cog gets smaller. If they were both the same size, the chain would travel on a horizontal line. Can you picture it? Imagine the bike from the driveside, like a bike glamour shot, not from above. The chain runs in a straight line, across the top and bottom, when the chain ring and cog are the same size. That would be the shortest route for a chain to take for a given gear ratio.
For those who are still with me, there is a useful part of this math. It's when you're trying to run a frame with vertical dropouts as a fixie or singlespeed. Can't quite get the chain tension dialed? Tighten it by using a larger chainring and smaller cog for the given gear ratio. Or loosen it by doing the reverse -- this is the kind of tiny adjustment that often can make the impossible vertical dropout work.