Welcome to the Jazz Community Forum
how to get Affects Requirement or related test case link or related test plan link for a defect from RTC using RPE?

One answer

Since you're using RPE, I suppose you're using reportable REST API, right? As the OSLC API shows such links straightaway without any trouble.
You can try a link like this:
https://clm:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=1]/(id|summary|auditableLinks//)