If you can, Follow the below Steps.
1) Create a VF Page by putting the Standard Controller as the Object that you are using like
2) Remove all the unnecessary things like header, sidebar, etc... from the VF Page by using the Attributes of
<apex:page>. i.e. If you open the VF Page, It must show only the Button or Link in the page.
3) Now Goto the Object Level and Click on "Edit Layout". Click on "Visualforce Pages" and drag your page to that detail page.
4) Change the Properties of the VF Page Section accordingly (Say Height=50% and Width=100% or 50%)
5) Save the Page Layout. Now check the Button or Link both in Classic and Lightning. It will work perfectly.
Hope this helps...