When the noun is preceded by an adjective both rather a (more typical of British English) and a rather are found.
When a rather is used, rather qualifies only the adjective, whereas with rather a it qualifies either the adjective or the entire noun phrase. Thus a rather long ordeal can mean only "an ordeal that is rather long," whereas rather a long ordeal can also mean roughly "a long process that is something of an ordeal."
What is in effect the difference with "a long process that is something of an ordeal" ? Maybe a different example would help here.