Is it permissible for him to ask the company for accommodation if it will be built with a riba-based loan?
There are two issues to do with riba which must be dealt with separately.
Causing riba to take place, such as if one of them asks another to take out a riba-based loan for him, or some of them act as a guarantor for someone who will get a riba-based loan from the bank and so on, which is helping and causing people to fall into this major sin.
Undoubtedly this kind is haraam, because the one who causes others to fall into something haraam has a share of the sin, as Allaah says (interpretation of the meaning): “but do not help one another in sin and transgression” [al-Maa’idah 5:1].
There is a particularly strong warning against causing people to fall into riba, in the hadeeth of Jaabir ibn ‘Abd-Allaah (may Allaah be pleased with him) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) cursed the one who consumes riba and the one who pays it, the one who writes it down and the two who witness it, and he said: They are all the same. Narrated by Muslim (1598).
Al-Nawawi (may Allaah have mercy on him) said:
This indicates that it is haraam to help others in falsehood.
Sharh Muslim (11/26).
When the Prophet (peace and blessings of Allaah be upon him) cursed khamr (alcohol), he also cursed those who help in its drinking, so he (peace and blessings of Allaah be upon him) said: “Allaah has cursed khamr and the one who drinks it, the one who pours it, the one who sells it, the one who buys it, the one who squeezes it, the one for whom it is squeezed, the one who carries it and the one to whom it is carried.” Narrated by Abu Dawood (3674) and classed as saheeh by al-Albaani in Saheeh Abi Dawood. The one for whom it is squeezed is the one who asks for it to be squeezed for himself or for someone else.
See; Tuhfat al-Ahwadhi (4/430).
The same ruling applies to everyone who asks for riba for himself or for someone else and causes it to occur.
On our site we have previously posted answers which give scenarios of the prohibition on helping in riba. See for example the answer to question no. 33709.
Riba is a kind of earning which is haraam because of the way in which it is acquired, not in and of itself. In the case of that which is haraam because of the way in which it is acquired, the sin is only on the one who acquires it, and there is no sin on the one who deals with the one who acquires it by buying, selling, giving, or receiving hospitality. The evidence for that is that the Prophet (peace and blessings of Allaah be upon him) would deal with the Jews in Madeenah, buying and selling, and he used to eat with them, although they are the ones whom Allaah described as consuming riba and taking people’s wealth unlawfully.
Based on that, there is nothing wrong with buying a house from the company, even if it was built with a riba-based loan, because the sin of that is on the one who agreed with the bank to take out the riba-based loan, or who helped with that, or approved of it. As for the employee who is going to buy the house from the company, there is no sin on him. This is like the Prophet’s dealings with the Jews, who used to consume riba, as stated above.
And Allaah knows best.