All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Mixing between opposite sexes is dangerous since it leads to many forbidden acts especially in the current period in which dissoluteness and immorality are widespread.
If a Muslim is invited to a marriage ceremony and he is aware that some prohibitions will occur there, such as mixing and the like, he is allowed to attend such a ceremony only if he is able to stop such prohibitions from taking place. By doing so he carries out two obligations; accepting the invitation and preventing the evil. He should not attend the party if he cannot change the evil since it leads to temptation. Allaah says (what means): {And when you see those who engage in [offensive] discourse concerning Our verses, then turn away from them until they enter into another conversation. And if Satan should cause you to forget, then do not remain after the reminder with the wrongdoing people.}[Quran 6:68].
Imaam Ibn Al-'Arabi said explaining the above verse: 'The verse is evidence that associating with those who commit major sins is not allowed.'
Feeling sorrow when you observe people disobeying Allaah is a sign of faith. No doubt, a true believer feels deep sorrow and gets angry whenever he sees people indulging in sins. He wishes that he had the ability to change the evil. He also becomes sad at the present painful situation of Muslims. However, it is the rule of Allaah that truth and falsehood are always in conflict and combat; sometimes the truth overcomes falsehood and sometimes it appears the opposite, but ultimately the truth prevails.
Allaah says (what means): {…And the [best] outcome is for the righteous} [7:128]. Allaah also says (what means): {…But you will never find in the way [i.e. established method] of Allaah any change, and you will never find in the way of Allaah any alteration.}[35:43].
However, a Muslim should examine himself regarding his obedience of his Lord and His Prophet . He should take the initiative to correct himself first and then the others. He should not bother much about the disbelief of disbelievers as Allaah said to His Prophet (what means): {And do not be grieved, [O Muhammad ], by those who hasten into disbelief. Indeed, they will never harm Allaah at all. Allaah intends that He should give them no share in the Hereafter and for them is a great punishment.}[3:176].
He also says (what means): {And whoever has disbelieved - let not his disbelief grieve you. To Us is their return and We will inform them of what they did. Indeed, Allaah is Knowing of that within the breasts.}[31:23].
As for the way to distinguish between a scholar and one who is ignorant, a scholar always refers to the Quran, Sunnah and to the way of the (practice and understanding) of the companions of the Prophet and relies upon that in issuing rulings, while an ignorant person follows his whims and desires, and issues baseless rulings that contradict Islam.
Allaah knows best.