I am of the opinion that almost all fiction happens in alternate universes, different from ours. Certainly all stories set the future contain elements which nobody could possibly know were true, except by using time travel, and contemporary fiction and much historical fiction contains fictional characters and evens which can be proved to not exist in our world.
So if your fictional setting almost has to be an alternate universe anyway, a historical novelist can include fictional characters and events in history. And of course, there are many historical events which are known so poorly by historians that writers have to use their imaginations a lot when describing them.
I note that there is a fictional genre of alternate history in which the main premise is things happening differently than in real life. I may say that many westerns and other movies set in historical eras fall into that genre by accident due to the carelessness of their writers.
That said, it is always better to reduce fictional elements that can be disproved as much as possible in your historical fiction, as much as possible as is consistent with good writing. And the discipline of having to write historically consistent stories can be good for a writer.
One historical novel which seems very good at fitting fictional events into the historical record is Little Big Man, 1964, by Thomas Berger - much more so than the movie. When I read it I noticed many well known events in Western history that Jack Crabb's life story was mixed up with. Thus I found it easy to believe that the other fictional events could have happened when and where the novel says they did - I find it easy to believe that Kit Carson was at home when Jack Crabb says he unsuccessfully tried to beg from him, for example.
The novel is narrated by Jack Crabb, with an introduction and afterword by the fictional writer Ralph Fielding Snell who interviews jack. Snell says that he checked everything that Jack said and the dates and places all check out. Snell says that the only thing Jack got wrong was saying that Crazy Horse didn't wear a war bonnet. Snell knows Jack is wrong, because he owns Crazy Horse's war bonnet and the dealer who sold it is very honest.
And of course Crazy Horse really was said to have never worn a war bonnet.
George MacDonald's Fraser's Flashman also seem to be very historically accurate, except for the existence of Flashman.
I have an idea for a story that climaxes in the Great Sioux War of 1876 but begins in 1862, when the protagonist is a new born baby. A young cavalry officer stationed in Minnesota has recruited a young friend as a bugler boy, and both of them have lost relatives in the Spirit Lake Massacre of 1857, and so have grudges against Inkpaduta and his people. The Minnesota Sioux Uprising starts in 1862, and Inkpaduta is rumored to be responsible for it.
The protagonist is found as a baby, the only survivor of a stagecoach massacre, and more or less adopted by the cavalry officer and his wife, while the young bugler boy becomes like a big brother to the baby protagonist.
Four years later, the cavalry officer's wife is dead (which I will probably blame on an attack by Inkpaduta's people) and the cavalry officer sees a doctor about his pains and discovers he has cancer and only a short time to live. The cavalry officer keeps it secret, and arranges with Lt. Bingham of Company C, Second US cavalry, about to be sent to Fort Phil Kearney, to go in Bingham's place., and the four-year-old- protagonist and the young bugler go along with him.
In real history, the reckless Lt. Bingham was killed in a skirmish with Sioux on December 6, and an 18th Infantry officer, the equally reckless Lt. Grummond, was put in charge of C Company. In my story, the young cavalry officer will be just as reckless as Lt. Bingham, hoping it it be less painful to die at the hands of the Sioux, and will be killed on December 6. Lt. Grummond will replace him as in real history, and the Fetterman massacre will happen as in real history.
Except that instead of 81 men dying on Massacre Hill, it will be 81 men and a boy. Bugler Adolph Metzger of C Company, Second Cavalry, was listed in the casualty list. Metzger's age was given as 21 when he first enlisted in 1855, making him about 32 in 1866. Metzger's age was probably exaggerated by years in his official records, but he would still be much too old for my bugler. There were a couple of references to a young bugler of the second cavalry at Fort Phil Kearney before the Massacre, so Company C could have had another & younger bugler, who presumably stayed in the fort on December 21, and so wasn't killed.
So I will put my fictional bugler in place of the possibly real second Bugler of C Company. But if he goes out with Fetterman and is killed, why isn't he listed in the official casualty list? For one thing, my fictional 4-year-old protagonist is orphaned on December 6, and General and Mrs. Carrington take him in to live with them and their young children. And the young bugler boy who is like a big brother to him will
spend all the time he can with him and the Carrington's will know how close they are, if everyone in the fort doesn't already. So they will cover up the young bugler's death because the young protagonist has just lost his father.
And I have made up other reasons for General Carrington to omit the fictional young bugler from the casualty list, reasons that will shock and anger the young protagonist years later when he learns the truth. He will run away from the Carringtons in anger and eventually find his adoptive father's old cavalry company and join them as a bugler boy.
One of the places they will be stationed will be Camp Brown on the Wind River Reservation, where he will meet some fictional descendants of the great Shoshone chief Washakie. They will be rather similar to your fictional princess of a real royal family. Years later, the protagonist will tells someone he knew great grandchildren of Chief Washakie and they will ask when Washakie lived and he will say that Washakie is still alive. The historical Washakie was in the Great Sioux War in 1876 and didn't die until 1900.
I am thinking of making one of those fictional great grandsons of Washakie the Shoshonie boy who was killed by hostiles at the Battle of the Rosebud on 17 June 1876. That boy was said to be 15. How could a man who died in 1900 have a great grandson who was born about 1860/61? If the boy's fictional mother was 15 to 20 when he was born, she would have been born about 1840 to 1845, and her fictional mother, Washakie's daughter, could have been 15 to 20 years old and born about 1820 to 1830. If Washakie was 15 to 30 years older than her he would have been born in 1790 to 1815, and in real life he was supposedly born sometime between 1798 and 1810.
I am also planning to have the protagonist meet fictional grandsons of the real Inkpaduta in 1876, and be forced by circumstances to be civil to them and get to know them a little.