Is it possible to varnish a section of of wooden floor?
You can certainly varnish a section or a spot. Far better than leaving it bare, if it is, where it will just get harder to fix while you wait - even if it does not match at all.

Making it blend is more trouble, though some of that can be helped by "just using it" rather than worrying about about it when it's freshly redone and the rest of the floor isn't - it will be far less noticeable after a month's wear, in most cases.

Since you mention "colors" I'm a bit concerned that you are dealing with not just varnish (which may vary from water-clear to various amber-yellow colors depending on formulation) but stain, which is a lot harder to match.