While it is physically possible to place an ungutted fish directly into the freezer, I would strongly advise against it if you want to preserve the flavor and texture of your meal.
The main issue comes down to the internal organs. The digestive tract contains active enzymes and natural bacteria. While freezing slows these processes down significantly, it does not stop enzymatic breakdown entirely. Over time, and especially during the thawing process, these digestive fluids can leach into the surrounding belly flesh, causing unpleasant bitterness, foul odors, and a mushy texture.
Furthermore, cleaning a fish after it has been frozen and thawed is significantly more difficult and messy. Freezing damages cell walls, making the delicate organs much softer and prone to rupturing when you try to gut the fish later, which risks spreading stomach contents and bile onto the meat.
If you have just a couple of minutes to spare, I highly recommend gutting the fish before freezing. You do not need to scale or fillet it right away—simply make a cut along the belly, remove the viscera, and rinse the internal cavity clean with cold water. Pat it completely dry with paper towels, wrap it tightly in plastic wrap to minimize air exposure, and store it in an airtight freezer bag. This brief step will protect the quality of the fish and ensure a much better dining experience when you are ready to prepare it.