Can we display warning message from Trigger
From trigger, you can not show the warning message. If you want to show the warning on the detail page of the record , just create a VF page and add it on the top of the detail page layout as inline page. Whenever your condition meets, that page will display the warning message