Rules Guy: Can you switch to a lefty (or righty) swing in order to get free relief?

golf ball near cart path

What do the Rules say about swinging as a lefty to get free relief?

Getty Images