I only have vague memories about this but it's an American or maybe British sci-fi film or TV-show set in our past, present time or in a near future judging by the environments, that includes aliens that forces a worm to enter restrained humans' heels or mouth from glass vials. A terrified victim strapped to a chair in a surgical room of sorts at one point had his mouth forced open with a steel ring so that the worm could enter. If I recall correctly there were also floating metal orbs in the sky and a horse-carriage driver wearing a very oddly shaped mask. Hope I'm not mixing up things here but this is all I remember and I haven't found anything about it. It's not body snatchers. Any ideas? Thanks in advance!
This is White Dwarf (1995).
Originally a TV pilot that flopped after (I recall) significant hype, it stands alone as a TV movie.
In the year 3040, New York medical student Driscoll Rampart (Neal McDonough) is completing his internship on Rusta, a rural planet which due to it being tidally locked to its primary, is divided into contrasting halves of day and night with the halves separated by a wall. The two sides are involved in a civil war: The day side containing a Victorian-styled colony is at odds with the night containing a medieval kingdom. The differences between the two cultures leaves Rampart in a state of wonder. Rampart arrives from Earth for a six-month stint at the Light Side clinic run by Dr. Akada (Paul Winfield). Rampart's ambition is to eventually set up a private practice in Manhattan on Park Avenue.
...set in our past, present time or in a near future judging by the environments...
The film had a bizarre mix of sci-fi, medieval fantasy, and pastoral frontier aesthetics, which is possibly why it failed to impress, and is probably why you're having a difficult time remembering the era in which it was set.
...aliens that forces a worm to enter restrained humans' heels or mouth from glass vials....
(Trigger warning for the very squeamish.)
There is a worm-like parasite that is used at one point to assassinate a sleeping man. The parasite is in a glass bottle held against the man's heel.
If I recall correctly there were also floating metal orbs in the sky...
The planet, having a distinct day side and night side, is kept habitable by "Regulators" - floating steel orbs of ancient alien origin. They don't rally factor into the film's story much aside from explaining how a tidally locked planet could be habitable, but they feature in a lot of establishing shots.
...and a horse-carriage driver wearing a very oddly shaped mask.
The carriage that brings Rampart from his (unseen) landing site to the day side colony is an old horse & buggy, but the coachman is wearing a strange gas mask.
Here is an article with a bit more detail about the show's plot, setting, and production. The film is pretty obscure now, but I was able to watch it online a year or so ago (even if I remembered the link I doubt I'd be able to add it here) and while it's a bit clunky at times, it's a lot of fun.