You can have two fields with two different controls(Link and Text Input with read-only or Label) referring to the same property. Add visibility condition on both of them, one when you want to display it as link otherwise as plain text.
You can try by adding a section as a column to the repeat grid. In the section, use inline dynamic layout and add two controls - link, text input for the same property along with visibility when condition based on your requirement. Please uncheck "Reserve space when hidden" checkbox.