Is it okay to mark one question as duplicate if the older question has no accepted answer?
Yes, it is completely fine to do so.
Note though however that the older question has to have at least one upvoted answer if it does not contain an accepted answer, otherwise you will not be able to flag the new question as a duplicate of it.
If it doesn't have an accepted answer or any upvoted answers, you will receive the following warning:
and the 'Vote to close' button will be greyed out.
My assumption as to the reasoning behind this is that if an answer is upvoted/accepted, it has generally been found to be useful by at least one person, increasing the likelihood of it being useful to other users who visit through the newer duplicate.