"I was told that" is correct. The other option is not acceptable.
If you want to use the verb 'to say' you must word it like this: "they said to me that I must sit" or "they said that to me already"
This is because
you tell someone something
but
you say something TO someone.
You can't forget the 'to'. You don't 'say someone', you 'say something to someone'. You could say, 'they said to me', if you want to use the verb 'to say'
Another example is the verb to do. You can 'do something TO someone', but you cannot 'do someone'. So you cannot say "I was done", you must say "this was done TO me".
I hope this helps