There are many ways to think about this and in the end it boils down to your intent for the painting or who you believe based on their own experience.
Technically, varnish (which is a form of resin) can be included with other mediums to help with specific painting goals - whether to assist in drying, thinning or glazing. However, for paintings intended for long-lasting presentation, it must be considered that including varnish as a medium will introduce an added risk of yellowing or discoloring as the painting ages in years as well as potentially making it more difficult to adequately clean a painting many years into the future - which usually involves removing the top layer varnish coats and re-vernishing. If too much varnish has been mixed into the paint layers below the top varnish layer then removal of that top layer for cleanign purposes introduces the risk of picking up and potentially destroying the paint underneath. Choice of the type of varnish also plays a role - it is better to use "soft" varnish as the top layer coat and reserve "hard" varnish for mixing into mediums sparingly.
If archivabiity and conservation are not of great concern for the painting, then using varnish as part of the medium mixtures is perfectly sound. The main concern for such a use in that case might be the drying sheen of the overall painting as paintings making use of a variety of mediums and paint dilution methods will end up with an inconsistent sheen on the final surface - some areas dull while other areas shiny. A final varnish coat is necessary to then even out the sheen across the whole paiting.
So, to conclude, if you paintings are intended for limited display (such as for commercial reproductions) and have little value for fine art display, art buyers, galleries, etc, then paint however you want with varnish as an added medium if you choose. If, however, the work must last many years and be put up for display and potentially need to be cleaned to maintain its conservation then be very sparing with your varnish usage and be sure to not use a medium mixture that only includes varnish. Always mix it with at least some drying oil so that when it binds with the oil as that paint layer dries, it will have little risk of being picked up during cleaning of any final/top varnish is removed many years later.
A common medium mixture that includes varnish is 2 parts varnish, 2 parts turpentine or mineral spirits and 3 parts stand oil. A small amount added to paint will assist in maintaining a smooth flow while a larger amount will help in creating a translucent glaze for color-tinting effects. An alternative to varnish which doesn't introduce as much tack (an also helps add bosy and texture to brush strokes) is Liquin Impasto, which also helps to aid in speeding up paint drying time as it is alkyd-based and helps create a similar glossy sheen to oil paints.