This is an extremely difficult question to answer because the versions of vAlmIki rAmAyaNa we have before us today is a 'priests and preachers' version. We can't call it even an 'Aryan' version because Indians over centuries have undergone amalgamations, absortions and mergers with invading races, to such an extent that we cannot distinguish among people on the basis of castes, races, and tribes.
Some groups of people have started nursing within their minds - biases, based on their own beliefs of their own identities and affiliations. If anything is said by an analyst or a historian or a writer, immediately it will have a rebounding reaction "our sentiments are hurt", "ban this", "ban that" etc. This intolerance is an obstruction in the path of fact-finding.
Subject to the above, without malice towards any group, I furnish below my provisional feeling about rAvaNa:-
rAvaNa was a fellow-king of rAma. rAma and rAvaNa were like two rival shop-keepers selling their goods. Readers know how traders, business persons, industrialists, bureaucrats and politicians behave in a market. You can take cement manufacturers for an example. They compete with one another fiercely, so-much-so that we consumers get an impression that we are going to get the best price and the best quality. They also form cartels, restrict supply of cement during construction season, and jack-up prices before your own eyes.
You can think of shops in a market. The rival traders bitterly quarrel all the time. The moment an Income Tax Officer or a Sales Tax Officer or a Labor Officer visits the area with his squad, the traders telephone one another or send clerks to the neighboring shops. Within a few minutes, all the shops down their shutters and the entire market gives a deserted look. The Inspectors have to return with blank faces and empty hands.
I have already mentioned in one of my blog-posts here itself, that Aryans and draviDians were like the European colonialists fighting with one another and also fighting with the natives and blacks when they revolt or obstruct the colonialisation. French and British colonialists fought in United States and CanaDa. We have in CanaDa, even today the French areas like Montreal and the British areas like Toronto. It happened between Dutch and British in Ceylon, Indonesia and East Indies. It happened among French, British, Portuguese and Dutch in India. It happened between French and Spanish in South America.
Phallic worship, was apparently not native to India. It might have entered into India along with the Indo-Europeans from North Europe. Example: Germany has a 28000-year-old sculpted phallus buried in the famous Hohle Fels Cave near Ulm in the Swabian Jura. India and Germany have the common thing 'swastik' sign. Then, why not fallic worship?
Greece has phallic worship. Tyrnavos City in Greece holds an annual Phallus festival. The picture of priapus can be seen at the following wikipedia link:
Romans too had phallic worship before Christian Era.
Hence, we should not wonder if rAma and rAvaNa were Aryans and actively participated in phallic worship.
rAvaNa was a phallus worshipper. vAlmIki rAmAyaNa does not expressly have verses of prayers by rAvaNa, in praise of Shiva. manDOdari lamented that rAvaNa lifted the Mount kailAsA. But folklore supports. Why vAlmiki rAmAyaNa didn't contain a eulogy-prayer (stOtram) by rAvaNa? At some point in the book of war, he should have prayed Lord Shiva. Reason: vAlmiki rAmAyaN was sung and propagated with the patronage of sun-clan kings (sUrya vamSis).
rAmA was apparently not a phallic worshipper. However, millions of Hindus believe that rAmA installed the rAmESwara lingam, at dhanushkODi, on the Southern tip of India.
In the book of War,
yad Indra vaivasvata bhAskarAn vA
svayamubha vaishvAnara SankarAn vaa
gamishyasi tvam daSadhA diSO vA
tathApi me nAdya gatO vimOkShyasE.
rAmA warned rAvaNa that he cannot be rescued by Gods Indra (Chief of Heaven), God of Death (vaivasvata), Sun, Fire God, Creator, and the God Sankara (Shiva), even after fleeing in ten directions.
In chapter 105, rAma prayed the Sun God, on the advice of Sage Agastya. In the prayer to Sun God, Agastya said that the Sun God was the supreme controller of the three trinity i.e. Creator brahma, protector VishNu and the destroyer Shiva.
But the Sun God was a petty God under the control of rAvaNa as per 1-15-10:
nainam sUryaH pratapati
pArshve vAti na maarutaH
calad Urmi mAlI tam driShTvA
samudro-api na kampate.
Sun God will not shine, if he sees rAvaNa. Wind does not move by his sides. A tempestuous sea will not move when it sees rAvaNa.
What would have been the use of praying such weak Sun God? rAma should have prayed Lord Shiva. But, in vAlmiki rAmAyaNa, we cannot trace any verse whereby rAma prays Lord Shiva.
In fact, there was only one instance of rAma and Shiva coming face-to-face. It was at the end, after the slaying of rAvaNa. After the fire-ordeal of Sita. Fire God returned SitA to rAma. Then many Gods appear before rAma, who included the Creator brahma and the Destroyer Shiva. Shiva brought rAma's dead father daSaratha, to rAma's presence to declare that he was happy with rAma's conduct.
Then rAma and lakshmaNa salute their father. They did not salute or praise Lord Shiva. The entire Chapter 119 was used for the conversation of the deceased father and the two sons. Lord Shiva was just like an observer or a guest artist in a film. Didn't he deserve one or two verses of prayer (stOtram) or at least thanks, from rAma?
I must write something good about rAma. In chapter 120, the Chief of Heavens Indra, asked rAma to seek a boon. rAma asked indra to bring back to life, all the vAnaras who laid down their lives in the battle.
Note: Here also, there may be a foresight or prudence. rAma had to go back to ayOdhya with full strength. Else, bharata may refuse to return the kingdom.
Summary: Arya or draviDa or AdivAsi, or something else is immaterial for a business-person or a ruler. The whet-stone is the question: how far they will be useful when required?
So, the stories of rAma being a devotee or Shiva or the Shiva being a devotee of rAma, do not find their tenacity or veracity in vAlmiki rAmAyaNa.