First, it is a good thing that you realized your fish need a bigger tank with a filter. You should get to that part as soon as possible. Before you get started, you need to know for sure if your goldfish is a common goldfish or a fancy goldfish. Common goldfish can be huge, and they require 40 gallon minimal tank for just a single one. Fancy goldfish are still big enough to require 20 gallon minimal tank for just a single fish. These requirements are meant for full sized, and when we measure the requirement of tank size we must use the full size.
Second, fish can go without food for 3 weeks no problem at all. They are cold blood animals. They do not require a lot of energy to keep up body heat like we do. Your goldfish will be totally fine without any food for the 3 days you are not around.