I see no direct way (there may be a utility class similar to HostObjectUtils somewhere). Without such you may be able to create a reference manually from string using:
Reference.ParseFromStableRepresentation
From two reference lines within a family file the below reference representations were noted:
The directions relate to orientation of the member, drawn from left to right on plan:
Left
ea0d44b8-86cc-48d2-814b-ef579c33eeda-00000c5f:1:12:SURFACE
Right
ea0d44b8-86cc-48d2-814b-ef579c33eeda-00000c5f:1:17:SURFACE
Top/Bottom
ea0d44b8-86cc-48d2-814b-ef579c33eeda-00000c5f:1:2:SURFACE
Front/Back
ea0d44b8-86cc-48d2-814b-ef579c33eeda-00000c5f:1:7:SURFACE
Left
462fa80a-60c1-48bd-9742-b98d6a32fb93-00000617:1:12:SURFACE
Right
462fa80a-60c1-48bd-9742-b98d6a32fb93-00000617:1:17:SURFACE
Top/Bottom
462fa80a-60c1-48bd-9742-b98d6a32fb93-00000617:1:2:SURFACE
Front/Back
462fa80a-60c1-48bd-9742-b98d6a32fb93-00000617:1:7:SURFACE

Probably better to use a sweep with a profile as shape and ref line as path rather than extrusion (if the aim is to extrude along the ref line).