Lana, who has asked for her last name not to be published, suffered a “mental breakdown” at hearing the news when she arrived to check in at Edinburgh Airport for a flight to Frankfurt and another on to Estonia.
She said she had checked two days before with both her airline Lufthansa and the German border police that her journey on January 17 would be allowed.
However, she was told by check-in staff she could not travel “because of Brexit”.
Edinburgh crime: Man critical after suffering serious head injury in city centre ‘fight’
Edinburgh weather: Here is when the storm is set to hit the Capital and the Lothians today
A71 crash: Edinburgh commuters face delays after ‘serious’ two-vehicle crash at Dalmahoy Junction
Edinburgh weather: Capital and the Lothians warned as Met Office predict thunderstorms to follow heat wave
West Lothian fire: Pictures show firefighters still battling West Lothian wildfire which broke out three days ago
They later informed her via Edinburgh Airport that only German citizens were permitted to enter Germany.
Lana, 28, was forced to watch the funeral via video link having spent more than £700 on travelling to Edinburgh and hotel accommodation.
She was further angered by Lufthansa then offering to refund the cost of her £423 air fare as a “goodwill gesture” when she had bought a refundable ticket and had already waited two months for her money back.
This week, Lana finally received the refund – minus a £63 administration fee – days after The Scotsman raised it with the airline.
The airline has offered her no apology or indicated whether it would provide any compensation.
The Estonian honorary consul in Aberdeen, who intervened on Lana’s behalf by speaking to check-in staff by phone when she was refused travel, said: “The ‘computer says no’ was the essence of their reply.”
Lana said: “The reason I was given why I could not fly via Germany was due to Brexit.
"However, the official immigration website provided proof that transit was possible regardless as a matter of urgency.
“The German ministry of immigration also confirmed via email that a transit was possible through Germany.
"How bizarre, an Estonian, European citizen is not allowed to travel to Estonia via another European country to attend her mother's funeral.
“An Estonian citizen who has all the required documents to travel and who put their health at risk to travel through Scotland, only to be rejected.
“A couple of days later, I got information that in fact my transit was possible, and the Embassy of Estonia confirmed I should have been allowed on the flight.
“I feel that someone needs to answer for their actions for preventing me, an Estonian citizen, from travelling to my homeland to say my last goodbyes to my mother.
“When I was told there was no way I could get on the plane, I had a mental breakdown and was told to move out of the way because I was delaying boarding.
“Nobody came to check on me, no staff member provided any sort of mental health support to me.
"If only Lufthansa or the German border police had told me I was not able to travel via Germany when I phoned them two days prior, I would have gone to London and on a direct flight to Estonia.
"The airline is not refunding me out of their goodwill but because I am entitled to that refund as I paid for the most expensive ticket - Economy Flex – with which I am allowed to cancel my flight and get a refund.
"This is absolutely shocking of them.”
Lana lives and works in Shetland studied at a Scottish university, is married to a Scot and has settled status in the UK.
Estonian honorary consul Simpson Buglass said: “Lana called me from the departure gate at Edinburgh Airport and explained she was being refused boarding despite having all the necessary documents to travel and having observed the required pre-travel protocols.
"She passed me to one of the airport staff, who repeated that their instructions were to prevent anyone from boarding who was not returning to Germany, and that it had something to do with Brexit.
"I explained that Lana was transiting through to Estonia, and, as an Estonian passport holder and EU citizen, that this was permitted under existing rules.
"I was told their instructions were to prevent passengers from boarding who were not returning to Germany.
"I explained that she had observed all the protocols and as far as I was aware was entitled to fly home.
"However the ‘computer says no’ was the essence of their reply.
"I am very sorry that I was unable to provide Lana with more assistance given the purpose of her trip.”
Travel centre staff at Waverley Station in Edinburgh said they had wept as they tried to help Lana return home.
One told The Scotsman: “This lady indeed was beside herself with grief.
"She just stood and broke her heart.
"Even the girl serving her cried.
"This indeed was a very sad event as we watched her, hunched over her suitcase, contemplating how she was going to get back to Shetland.”
A Lufthansa spokesperson said: "We will respond to the customer, but that might take some time.
“Lufthansa has reacted in accordance with the rules stated by the legal authorities.
"Lufthansa sends its sympathies to the passenger and as a goodwill gesture, Lufthansa is refunding her ticket fare.
“Since the start of the pandemic, Lufthansa has recommended all passengers check travel and entry requirements along with the status of their flights before travel.
"Lufthansa has a specific page dedicated to providing customers with travel information and restrictions, and also distributes a pre-flight email to passengers, reminding them to check their requirements.
"These requirements are solely defined by each country, never by the airline, which is why the immigration authorities always have the final say when it comes to passenger admission, even if Lufthansa is obliged to check the documents on their behalf.
“As a general rule, every passenger is responsible for checking their travel documents and the entry requirements at the embassy or consulate of the destination country in question.
"The Lufthansa Group respects and adheres to all regulations and does its utmost to ensure safe travel.”
Edinburgh Airport said the passenger was the airline’s responsibility.