is there way to add list item when user right click of a file using sharepoint add-in or extension as following image
What you're looking for is a list command set extension in a SharePoint Framework solution. Check the documentation.
If you want your extension to appear in the right click menu make sure you set the Location
attribute to ClientSideExtension.ListViewCommandSet.ContextMenu
(or ClientSideExtension.ListViewCommandSet
for both the menu and the bar) in the elements.xml
file.