Assuming a hypothetical system without gas but only solid rocks, how big of a planet can form through the coalescing of these rocks? I have heard that gas giants are primarily huge solid bodies like regular rocky planets that exponentially gained more and more gas in their atmosphere through their increase in mass which  they use to  pick up even more mass ,gaining even more gas, and practically any planet we know today above a certain size threshold is a gas giant
That being said, assuming an area in space with very little or no gas but a bountiful supply of rocks, how big can a solid planet consisting of these coalesced rocks get?
That very much depends on the structure of the solids, i.e. whether they exist in the form of small dust, or ready-to-smash planetesimals.
In any case, the available median dust mass for planet formation is about 158 $\rm m_{earth}$ (see Tychoniec et al., (2020)). If you leave all this mass as dust, without any gas interactions, the dust will not coalesce into planetesimals, as a hydrodynamic instability is required to jump over the meter-sized barrier (Johansen et al., (2014)).
However, if you somehow allow all this dust to be converted into planetesimals, then the size of the planet you can form will be given by how narrow you can pack the planetesimals. The absolute upper mass of the formed planet will be given by the 158 $\rm m_{earth}$, but realistically , that is going to be lower, as planetesimals and collision ejecta are lost during the smashing phase of planet formation.
As you were asking about the size of this hypothetical planet, is we assume no compressional effects and hence the same mean density as earth, you would get a solid ball of the size of $\rm 158^{1/3} \; r_{earth} \approx 5.4\; r_{earth}$.