Yes, in Iran, no tourist is questioned about marriage. For Iranians, this is a matter of law and they should be married, but there is no problem for tourists. You can safely travel to Iran with your friend.