Not something I recognise, but the colours and symbols remind me of Spanish rank badges (for modern examples see
https://en.wikipedia.org/wiki/Civil_Guard_(Spain) )
If it was a rank badge then expect it to be worn on one side of the beret, left or right, with a unit badge on the other.