During my visit to the company/interview I saw different people wear different clothes, some were wearing formal clothes, and some not. I was so nervous that I totally forgot to ask the recruiter about the dress code, and now I'm expecting a call from him accepting or declining my candidacy. Would it be appropriate for me to ask this question if he calls me with a job offer?
Would it be appropriate? It is certainly appropriate if it will change whether you accept the job offer. However, if the dress code is something you want to know, but it doesn't have a significant impact on your decision, then I wouldn't bother asking about it now. It would be a strange question to me at such a late stage in the interview process.
Even if the dress code isn't a deciding factor, it is certainly still an important question. If you decide to take the job, that's something you can ask your manager or HR before your first day. Just say that you saw a lot of styles during the interview and wanted to know what was appropriate for your first day.