In order to situate your function func inline just as the + operator (along with many others), you'll need to define a precedence order for func and it's arguments. You can achieve this in SWI-PROLOG with op/3.
For example, the directive (preceding code where func/2 is used):
:- op(500,yfx,func).
To implement func/2, you can either write a meta-interpreter for your language (i.e., you write a PROLOG program which parses term expressions including func and interprets them as you wish), or if func/2 is strictly arithmetic, you can use arithmetic_function/1 also as a directive, as follows:
:- arithmetic_function(func/2).
Testing this with the following definition for func/2:
func(X, Y, Z) :-
Z is X + Y.
Gives, with your example:
?- A is (2 func 3) func (4 func (2+1)).
A = 12.