You are "accompanied by" someone if they join you or come with you in a passive sentence:
I was accompanied by my two dogs on my long walk this morning.
He was accompanied by a beautiful girl when he danced the tango.
The two brothers were accompanied by two gorgeous sisters.
In an active sentence, there is no preposition to worry about when talking about location:
His wife accompanied him to the party.
My two dogs accompanied me on my long walk this morning.
With musical instruments:
He was accompanied, on the piano, by a very famous pianist.
A very famous pianist accompanied him on the piano.
Your sentence "He was accompanied on a beautiful dance from a girl" is incorrect. Neither preposition is correct, it seems strange to attach "beautiful" to the dance instead of the girl, and the word order is rather unnatural. "He was accompanied by a beautiful girl during the dance". I suppose you could say "He was accompanied by a girl during the beautiful dance" but it sounds odd.
Student or Learner