Ave Krasimir,
Yours is an
Islamic ring with early Hindu-Islamic numerals/symbols arranged, as you mentioned, in a "magic square."
Perhaps 8th-12th century or perhaps a
bit later?
From your photos is appears to be authentic?
Quoting
Pollio: In early
Islamic mysticism, these numerical formulas were believed to endow the wearer with the ability to communicate with genies and other spirits".
So in other words, this is a sorcerers ring. Wear with care!