Smallest Possible:
The highest density you can get with a naturally forming planet would be from one that forms in an environment that averages about 4600-5000°C. This will boil away everything else leaving just a molten mass of Tungsten, Osmium, Rhenium, and Tantalum. If something were to then happen that pulls or pushes the planet farther away from the heat source, you would be left with a round solid heavy metal world with a density of somewhere between 16.65-22.59 g/cm³ depending on the ratios of these 4 remaining elements. Since you won't get a purely Osmium world this way, your actual density cap is probably going to be somewhere around 20 g/cm³. (Technically a purely Rhenium planet could be 21 g/cm³ but its boiling point is so close to the less dense Tungsten that boiling off Tungsten without also losing your Rhenium is unfeasible). This would give you a radius of about 1750km
If your planet is artificially formed from natural elements, you could make it out of pure Osmium for a maximum density of 22.59 g/cm³ and a radius of 1550km. This would not happen in nature because of boiling points and co-genesis of these elements from the same sorts of astrological events.
For a an artificial structure that relies on purely theoretical science, you could build a shell around a primordial black hole (if they exist), but you have to make sure it is not so small that it would just melt from the black hole's hawking radiation. For this I would suggest you use a black hole that is ~6e13kg at a radius of about 20m. Now, something this small just containing a black hole of this size would probably just melt... unless you are doing something useful with all of that heat. With some clever engineering you can treat this "world" as a tiny power plant. At a power output of 100KW, this black hole is 10,000 times weaker than the average nuclear power plant which requires about 2.6million m² of land area meaning this power plant only needs about 260m². Since your tiny world has about 5027m² of surface, you have plenty of room for both the power plant and any additional stuff you may need to expend or transfer the energy off world and radiate off the unused heat. With cleaver engineering, you could probably even go a few meters smaller, but every meter you contract, the smaller you need to make the black hole and the hotter it gets, and the less room you have for your reactor... this means the issue of heat goes up exponentially VERY quickly at a smaller scale.
Biggest possible:
The biggest possible natural world is really hard to solve for because it is so hard to predict how loosely elements can pack under unknown circumstances. For example, Hyperion is a moon with what appears to have a rocky crust and maybe a highly porous icy core, but we don't really understand it that well. All we know for sure is that it has a density of only 0.5 g/cm³. Since we can't explain how it was formed or why its density is so low, we cannot extrapolate for sure if this phenomenon could apply to larger worlds. But if we work off of the assumption that it might, we could get a radius of about 70,000km.
For an artificial solution, the lightest known solid material that that can survive in 1G is a substance called graphene aerogel. With a density of .00016 g/cm³ you could have a radius of about 218,000,000km meaning you could make a solid planet just a bit larger than the orbit of the Earth around the sun with one surface G.
Now keep in mind that this math assumes a solid, homogeneous, aerogel structure; so, engineering limitations might force you to use a denser aerogel as you get to the core to compensate for pressure, but as an engineered structure, you also don't have to make it perfectly solid either; so, after all engineering variables are solved for, you might have an aerogel lattice structure or hallowed out structure over a billion kilometers across or you might be forced to make something much smaller. This is really hard to predict for certain without working out every possible engineering solution to the problem in detail, but either way; something on the dyson sphere scale certainly seems possible.
All calculations are approximations based off of these calculators: