It's not as simple as you may think. There are two main obstacles.
Firstly, look at the combustion of carbon (coal) as an example:
$$C(s)+O_2(g)\to CO_2(g)$$
The stoichiometry tells us that a mere $12\ \mathrm{g}$ of coal requires about $22.4\ \mathrm{L}$ of oxygen (at Standard conditions), that is over $100\ \mathrm{L}$ of air!
Secondly, the reaction equation also tell us that the same volume of gas (oxygen) is being consumed as is being generated as carbon dioxide. So there no net increase in gas, thus no net increase in volume. Nothing to measure here!
Or take the example of a generic, solid hydrocarbon $C_nH_{n+2}$ and assume the water vapour is allowed to condense to water ($(l)$), by cooling the device back to room temperature:
$$C_nH_{n+2}(s)+\frac{3n+1}{2}O_2(g)\to nCO_2(g)+\frac{n+2}{2}H_2O(l)$$
Neglecting the volumes of the solid hydrocarbon and the water, here the gas consumed in the combustion is actually more voluminous than the carbon dioxide generated, because always:
$$\frac{3n+1}{2}>n$$
Of course there are substances that generate gas without consuming any, when heated. The burning of limestone springs to mind:
$$CaCO_3(s) \to CaO(s)+CO_2(g)$$
This requires temperatures in excess of $1000\ \mathrm{K}$ though.
Suppose we have such a device, of volume $V$, at atmospheric pressure $P_0$, at room temperature $T_0$ and loaded with a known quantity of combustible material and enough air.
Using $P_0V=n_0RT_0$ we know the initial number of moles $n_0$ of gas inside the apparatus.
Now we carry out the "burn" and when complete allow cooling back to $T_0$. The pressure will now be different, say $P$.
Using $PV=n_1RT_0$ we can determine $n_1$.
The difference $\Delta n=n_1-n_0$ is the number of moles of gas that was created or disappeared during the combustion of the known quantity of combustible material. How useful that information is will depend to some extent on one's knowledge of stoichiometry.