Yes, it is generally permissible to wear perfume around mahrams (those to whom marriage is forbidden) and the same gender. However, caution should be exercised when wearing strong fragrances around the opposite gender, particularly in public settings, to maintain modesty and avoid attracting undue attention.