Yes you can. You need to set the values in the Prismatic joint to 0, and then add a kinematic relationship around the joint to include more complex models.
We have a dedicated library example called Multiphysics on the File Exchange that explains how to connect Simscape 1D to Multibody 3D:
you can install it directly from your add-ons access in MATLAB:
Then you can open of the example to see how to implement it using special blocks for connecting 1d with 3d, eg the example with friction on a prismatic joint: