It should be possible using field variables:
https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v232/en/ans_mat/mat_fielduserdef.html
Please search for Spatially Varying Materials in Ansys Mechanical Made Easy by PADT and you will find an elaborate explanation of the same.
-Aniket
How to access Ansys help links
Guidelines for Posting on Ansys Learning Forum